@anexia/eslint-config-marine
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -5,76 +5,25 @@ const path = require('path'); | ||
extends: [path.join(__dirname, 'index.js')], | ||
plugins: ['@angular-eslint', '@typescript-eslint/tslint'], | ||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{}, | ||
{ | ||
usePrettierc: true, | ||
}, | ||
], | ||
'@typescript-eslint/tslint/config': [ | ||
'warn', | ||
{ | ||
rules: { | ||
'template-accessibility-alt-text': true, | ||
'template-accessibility-elements-content': true, | ||
'template-accessibility-label-for': true, | ||
'template-accessibility-tabindex-no-positive': true, | ||
'template-accessibility-table-scope': true, | ||
'template-accessibility-valid-aria': true, | ||
}, | ||
rulesDirectory: ['node_modules/codelyzer'], | ||
}, | ||
], | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'error', | ||
{ | ||
allowExpressions: true, | ||
}, | ||
], | ||
'@typescript-eslint/naming-convention': 0, | ||
'@typescript-eslint/no-floating-promises': 0, | ||
'@typescript-eslint/no-extraneous-class': 0, | ||
'@typescript-eslint/no-empty-function': 0, | ||
'@angular-eslint/component-class-suffix': 'error', | ||
'@angular-eslint/contextual-lifecycle': 'error', | ||
'@angular-eslint/directive-selector': [ | ||
'error', | ||
{ | ||
type: 'attribute', | ||
prefix: 'eworkbench', | ||
style: 'camelCase', | ||
}, | ||
], | ||
'@angular-eslint/component-selector': [ | ||
'error', | ||
{ | ||
type: 'element', | ||
prefix: 'eworkbench', | ||
style: 'kebab-case', | ||
}, | ||
], | ||
'@angular-eslint/no-conflicting-lifecycle': 'error', | ||
'@angular-eslint/no-host-metadata-property': 'error', | ||
'@angular-eslint/no-input-rename': 'error', | ||
'@angular-eslint/no-inputs-metadata-property': 'error', | ||
'@angular-eslint/no-output-native': 'error', | ||
'@angular-eslint/no-output-on-prefix': 'error', | ||
'@angular-eslint/no-output-rename': 'error', | ||
'@angular-eslint/no-outputs-metadata-property': 'error', | ||
'@angular-eslint/use-lifecycle-interface': 'warn', | ||
'@angular-eslint/use-pipe-transform-interface': 'error', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.component.html'], | ||
parser: '@angular-eslint/template-parser', | ||
plugins: ['@angular-eslint/template'], | ||
files: ['*.ts', '*.tsx'], | ||
extends: ['plugin:@angular-eslint/recommended', 'plugin:@angular-eslint/template/process-inline-templates'], | ||
rules: { | ||
'@angular-eslint/template/banana-in-a-box': 'error', | ||
'@angular-eslint/template/no-negated-async': 'error', | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'error', | ||
{ | ||
allowExpressions: true, | ||
}, | ||
], | ||
'@typescript-eslint/naming-convention': 0, | ||
'@typescript-eslint/no-floating-promises': 0, | ||
'@typescript-eslint/no-extraneous-class': 0, | ||
'@typescript-eslint/no-empty-function': 0, | ||
}, | ||
}, | ||
{ | ||
files: ['*.component.html'], | ||
extends: ['plugin:@angular-eslint/template/recommended'], | ||
rules: {}, | ||
}, | ||
], | ||
}; |
184
index.js
module.exports = { | ||
extends: [ | ||
'@anexia/eslint-config-aqua', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
], | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
rules: { | ||
'@typescript-eslint/array-type': 0, | ||
'@typescript-eslint/await-thenable': 0, | ||
'@typescript-eslint/ban-ts-ignore': 0, | ||
'@typescript-eslint/consistent-type-assertions': [ | ||
2, | ||
{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }, | ||
], | ||
'@typescript-eslint/consistent-type-definitions': [2, 'interface'], | ||
'@typescript-eslint/explicit-function-return-type': 0, | ||
'@typescript-eslint/explicit-member-accessibility': 2, | ||
'@typescript-eslint/interface-name-prefix': 0, | ||
'@typescript-eslint/member-delimiter-style': 2, | ||
'@typescript-eslint/member-ordering': 0, | ||
'@typescript-eslint/naming-convention': 2, | ||
'@typescript-eslint/no-base-to-string': 2, | ||
'@typescript-eslint/no-dynamic-delete': 2, | ||
'@typescript-eslint/no-empty-interface': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/no-extraneous-class': 2, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
'@typescript-eslint/no-require-imports': 2, | ||
'@typescript-eslint/no-throw-literal': 2, | ||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 2, | ||
'@typescript-eslint/no-unnecessary-condition': 2, | ||
'@typescript-eslint/no-unnecessary-type-arguments': 2, | ||
'@typescript-eslint/prefer-for-of': 2, | ||
'@typescript-eslint/prefer-function-type': 2, | ||
'@typescript-eslint/prefer-includes': 2, | ||
'@typescript-eslint/prefer-nullish-coalescing': 2, | ||
'@typescript-eslint/prefer-optional-chain': 2, | ||
'@typescript-eslint/prefer-readonly': 2, | ||
'@typescript-eslint/switch-exhaustiveness-check': 2, | ||
'@typescript-eslint/type-annotation-spacing': 2, | ||
'@typescript-eslint/unified-signatures': 2, | ||
'brace-style': 0, | ||
'@typescript-eslint/brace-style': [2, '1tbs', { allowSingleLine: true }], | ||
'comma-spacing': 0, | ||
'@typescript-eslint/comma-spacing': [2, { before: false, after: true }], | ||
'dot-notation': 0, | ||
'@typescript-eslint/dot-notation': [2, { allowKeywords: true, allowPattern: '(^[A-Z])|(^[a-z]+(_[a-z]+)+$)' }], | ||
'func-call-spacing': 0, | ||
'@typescript-eslint/func-call-spacing': [2, 'never'], | ||
'keyword-spacing': 0, | ||
'@typescript-eslint/keyword-spacing': [2, { before: true, after: true }], | ||
'lines-between-class-members': 0, | ||
'@typescript-eslint/lines-between-class-members': [2, 'always', { exceptAfterSingleLine: true }], | ||
'no-dupe-class-members': 0, | ||
'@typescript-eslint/no-dupe-class-members': 2, | ||
'no-extra-semi': 0, | ||
'@typescript-eslint/no-extra-semi': 2, | ||
'no-useless-constructor': 0, | ||
'@typescript-eslint/no-useless-constructor': 2, | ||
indent: 0, | ||
'@typescript-eslint/indent': [2, 'tab'], | ||
'no-unused-vars': 0, | ||
'@typescript-eslint/no-unused-vars': [ | ||
2, | ||
{ | ||
vars: 'all', | ||
args: 'after-used', | ||
ignoreRestSiblings: true, | ||
extends: ['@anexia/eslint-config-aqua'], | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
], | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
], | ||
quotes: 0, | ||
'@typescript-eslint/quotes': [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }], | ||
semi: 0, | ||
'@typescript-eslint/semi': 2, | ||
'space-before-function-paren': 0, | ||
'@typescript-eslint/space-before-function-paren': [2, { anonymous: 'never', named: 'never', asyncArrow: 'always' }], | ||
rules: { | ||
'@typescript-eslint/array-type': 0, | ||
'@typescript-eslint/await-thenable': 0, | ||
'@typescript-eslint/ban-ts-ignore': 0, | ||
'@typescript-eslint/consistent-type-assertions': [ | ||
2, | ||
{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }, | ||
], | ||
'@typescript-eslint/consistent-type-definitions': [2, 'interface'], | ||
'@typescript-eslint/explicit-function-return-type': 0, | ||
'@typescript-eslint/explicit-member-accessibility': 2, | ||
'@typescript-eslint/interface-name-prefix': 0, | ||
'@typescript-eslint/member-delimiter-style': 2, | ||
'@typescript-eslint/member-ordering': 0, | ||
'@typescript-eslint/naming-convention': 2, | ||
'@typescript-eslint/no-base-to-string': 2, | ||
'@typescript-eslint/no-dynamic-delete': 2, | ||
'@typescript-eslint/no-empty-interface': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/no-extraneous-class': 2, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
'@typescript-eslint/no-require-imports': 2, | ||
'@typescript-eslint/no-throw-literal': 2, | ||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 2, | ||
'@typescript-eslint/no-unnecessary-condition': 2, | ||
'@typescript-eslint/no-unnecessary-type-arguments': 2, | ||
'@typescript-eslint/prefer-for-of': 2, | ||
'@typescript-eslint/prefer-function-type': 2, | ||
'@typescript-eslint/prefer-includes': 2, | ||
'@typescript-eslint/prefer-nullish-coalescing': 2, | ||
'@typescript-eslint/prefer-optional-chain': 2, | ||
'@typescript-eslint/prefer-readonly': 2, | ||
'@typescript-eslint/switch-exhaustiveness-check': 2, | ||
'@typescript-eslint/type-annotation-spacing': 2, | ||
'@typescript-eslint/unified-signatures': 2, | ||
'no-use-before-define': 0, | ||
'no-undef': 0, | ||
'brace-style': 0, | ||
'@typescript-eslint/brace-style': [2, '1tbs', { allowSingleLine: true }], | ||
'comma-spacing': 0, | ||
'@typescript-eslint/comma-spacing': [2, { before: false, after: true }], | ||
'dot-notation': 0, | ||
'@typescript-eslint/dot-notation': [2, { allowKeywords: true, allowPattern: '(^[A-Z])|(^[a-z]+(_[a-z]+)+$)' }], | ||
'func-call-spacing': 0, | ||
'@typescript-eslint/func-call-spacing': [2, 'never'], | ||
'keyword-spacing': 0, | ||
'@typescript-eslint/keyword-spacing': [2, { before: true, after: true }], | ||
'lines-between-class-members': 0, | ||
'@typescript-eslint/lines-between-class-members': [2, 'always', { exceptAfterSingleLine: true }], | ||
'no-dupe-class-members': 0, | ||
'@typescript-eslint/no-dupe-class-members': 2, | ||
'no-extra-semi': 0, | ||
'@typescript-eslint/no-extra-semi': 2, | ||
'no-useless-constructor': 0, | ||
'@typescript-eslint/no-useless-constructor': 2, | ||
indent: 0, | ||
'@typescript-eslint/indent': [2, 'tab'], | ||
'no-unused-vars': 0, | ||
'@typescript-eslint/no-unused-vars': [ | ||
2, | ||
{ | ||
vars: 'all', | ||
args: 'after-used', | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
quotes: 0, | ||
'@typescript-eslint/quotes': [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }], | ||
semi: 0, | ||
'@typescript-eslint/semi': 2, | ||
'space-before-function-paren': 0, | ||
'@typescript-eslint/space-before-function-paren': [ | ||
2, | ||
{ anonymous: 'never', named: 'never', asyncArrow: 'always' }, | ||
], | ||
'@typescript-eslint/unbound-method': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/no-unsafe-assignment': 0, | ||
'@typescript-eslint/no-unsafe-member-access': 0, | ||
'@typescript-eslint/no-unsafe-call': 0, | ||
'@typescript-eslint/no-unsafe-return': 0, | ||
'@typescript-eslint/ban-ts-comment': 0, | ||
}, | ||
'no-use-before-define': 0, | ||
'no-undef': 0, | ||
'@typescript-eslint/unbound-method': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/no-unsafe-assignment': 0, | ||
'@typescript-eslint/no-unsafe-member-access': 0, | ||
'@typescript-eslint/no-unsafe-call': 0, | ||
'@typescript-eslint/no-unsafe-return': 0, | ||
'@typescript-eslint/ban-ts-comment': 0, | ||
}, | ||
}, | ||
], | ||
}; |
{ | ||
"name": "@anexia/eslint-config-marine", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Typescript ESLint shareable config", | ||
@@ -26,20 +26,19 @@ "main": "index.js", | ||
"dependencies": { | ||
"@anexia/eslint-config-aqua": "^1.0.0" | ||
"@anexia/eslint-config-aqua": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@angular-eslint/builder": "^0.8.0-beta.7", | ||
"@angular-eslint/eslint-plugin": "^0.8.0-beta.7", | ||
"@angular-eslint/eslint-plugin-template": "^0.8.0-beta.7", | ||
"@angular-eslint/template-parser": "^0.8.0-beta.7", | ||
"@types/node": "^14.14.16", | ||
"@typescript-eslint/eslint-plugin": "^4.11.1", | ||
"@typescript-eslint/parser": "^4.11.1", | ||
"codelyzer": "^6.0.1", | ||
"eslint": "^7.16.0", | ||
"eslint-config-prettier": "^7.1.0", | ||
"eslint-plugin-prettier": "^3.3.0", | ||
"eslint-plugin-vue": "^7.4.0", | ||
"@angular-eslint/builder": "^1.2.0", | ||
"@angular-eslint/eslint-plugin": "^1.2.0", | ||
"@angular-eslint/eslint-plugin-template": "^1.2.0", | ||
"@angular-eslint/template-parser": "^1.2.0", | ||
"@types/node": "^14.14.32", | ||
"@typescript-eslint/eslint-plugin": "^4.16.1", | ||
"@typescript-eslint/parser": "^4.16.1", | ||
"eslint": "^7.21.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-vue": "^7.7.0", | ||
"prettier": "^2.2.1", | ||
"typescript": "^4.1.3" | ||
"typescript": "^4.2.3" | ||
} | ||
} |
const path = require('path'); | ||
module.exports = { | ||
extends: [ | ||
path.join(__dirname, '..', 'jsx.js'), | ||
'@anexia/eslint-config-aqua/prettier/jsx', | ||
path.join(__dirname, 'prettier.js'), | ||
'prettier/react', | ||
], | ||
extends: [path.join(__dirname, '..', 'jsx.js'), '@anexia/eslint-config-aqua/prettier/jsx', path.join(__dirname, 'prettier.js')], | ||
}; |
module.exports = { | ||
extends: ['@anexia/eslint-config-aqua/prettier', 'prettier/@typescript-eslint'], | ||
extends: ['@anexia/eslint-config-aqua/prettier', 'prettier'], | ||
}; |
@@ -8,4 +8,3 @@ const path = require('path'); | ||
path.join(__dirname, 'prettier.js'), | ||
'prettier/react', | ||
], | ||
}; |
@@ -8,4 +8,3 @@ const path = require('path'); | ||
path.join(__dirname, 'prettier.js'), | ||
'prettier/vue', | ||
], | ||
}; |
@@ -98,6 +98,6 @@ # @anexia/eslint-config-marine | ||
Using the Angular extended config will require you to additionally install `@angular-eslint/builder`, `@angular-eslint/eslint-plugin`, `@angular-eslint/eslint-plugin-template`, `@angular-eslint/template-parser`, `@typescript-eslint/tslint` and `codelyzer` | ||
Using the Angular extended config will require you to additionally install `@angular-eslint/builder`, `@angular-eslint/eslint-plugin`, `@angular-eslint/eslint-plugin-template`, and `@angular-eslint/template-parser` | ||
```bash | ||
npm i -D @typescript-eslint/tslint codelyzer @angular-eslint/builder @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser | ||
npm i -D @angular-eslint/builder @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser | ||
``` | ||
@@ -104,0 +104,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13
11730
209