Last active
November 11, 2021 07:55
-
-
Save justerror/80c41ccb7061d6c34847db547267eef8 to your computer and use it in GitHub Desktop.
Configuration file for ESLint with Angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"root": true, | |
"env": { | |
"es6": true | |
}, | |
"ignorePatterns": ["dist"], | |
"overrides": [ | |
{ | |
"files": ["*.ts"], | |
"parserOptions": { | |
"project": ["tsconfig.json"], | |
"createDefaultProgram": true | |
}, | |
"extends": [ | |
"plugin:@angular-eslint/ng-cli-compat", | |
"plugin:@angular-eslint/template/process-inline-templates" | |
], | |
"rules": { | |
"@angular-eslint/component-max-inline-declarations": [ | |
"error", | |
{ | |
"animations": 20, | |
"styles": 5, | |
"template": 5 | |
} | |
], | |
"@angular-eslint/no-input-prefix": [ | |
"error", | |
{ | |
"prefixes": ["on"] | |
} | |
], | |
"@angular-eslint/no-lifecycle-call": "error", | |
"@angular-eslint/no-queries-metadata-property": "error", | |
"@angular-eslint/relative-url-prefix": "error", | |
"@angular-eslint/use-component-view-encapsulation": "error", | |
"@typescript-eslint/await-thenable": "error", | |
"@typescript-eslint/ban-ts-comment": [ | |
"error", | |
{ | |
"minimumDescriptionLength": 3, | |
"ts-check": "allow-with-description", | |
"ts-expect-error": "allow-with-description", | |
"ts-ignore": "allow-with-description", | |
"ts-nocheck": "allow-with-description" | |
} | |
], | |
"@typescript-eslint/consistent-type-definitions": "error", | |
"@typescript-eslint/explicit-member-accessibility": [ | |
"error", | |
{ | |
"accessibility": "no-public" | |
} | |
], | |
"@typescript-eslint/naming-convention": "off", | |
"@typescript-eslint/no-extraneous-class": "off", | |
"@typescript-eslint/no-for-in-array": "error", | |
"@typescript-eslint/no-non-null-assertion": "off", | |
"@typescript-eslint/no-require-imports": "error", | |
"@typescript-eslint/no-shadow": "off", | |
"@typescript-eslint/no-this-alias": "error", | |
"@typescript-eslint/no-unused-expressions": [ | |
"error", | |
{ | |
"allowTaggedTemplates": true, | |
"allowTernary": true | |
} | |
], | |
"@typescript-eslint/require-await": "error", | |
"id-blacklist": "off", | |
"id-denylist": "off", | |
"max-lines": ["warn", 500], | |
"no-duplicate-case": "error", | |
"no-extra-bind": "error", | |
"no-param-reassign": "off", | |
"no-redeclare": "error", | |
"no-return-await": "error", | |
"no-sequences": "error", | |
"no-sparse-arrays": "error", | |
"no-template-curly-in-string": "error", | |
"no-underscore-dangle": [ | |
"error", | |
{ | |
"allowAfterSuper": true, | |
"allowAfterThis": true, | |
"allowFunctionParams": false | |
} | |
], | |
"prefer-arrow/prefer-arrow-functions": "off", | |
"prefer-object-spread": "error", | |
"require-await": "error" | |
} | |
}, | |
{ | |
"files": ["*.html"], | |
"extends": ["plugin:@angular-eslint/template/recommended"], | |
"rules": { | |
"@angular-eslint/template/accessibility-alt-text": "error", | |
"@angular-eslint/template/conditional-complexity": ["error"], | |
"@angular-eslint/template/no-any": "off", | |
"@angular-eslint/template/no-autofocus": "off", | |
"@angular-eslint/template/no-distracting-elements": "error", | |
"@angular-eslint/template/no-duplicate-attributes": "error" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment