Last active
January 31, 2022 01:23
-
-
Save ruandeveloper/263603568460d073554c9d875151b754 to your computer and use it in GitHub Desktop.
Rules do ESLint para o 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
{ | |
"root": true, | |
"ignorePatterns": [ | |
"projects/*/" | |
], | |
"overrides": [ | |
{ | |
"files": [ | |
"*.ts" | |
], | |
"parserOptions": { | |
"project": [ | |
"tsconfig.eslint.json" | |
], | |
"createDefaultProgram": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/eslint-recommended", | |
"plugin:@typescript-eslint/recommended", | |
"plugin:@angular-eslint/recommended", | |
"plugin:@angular-eslint/recommended--extra", | |
"plugin:@angular-eslint/template/process-inline-templates" | |
], | |
"rules": { | |
"no-console": "error", | |
"no-mixed-spaces-and-tabs": "off", | |
"@angular-eslint/directive-selector": [ | |
"error", | |
{ | |
"type": "attribute", | |
"prefix": "app", | |
"style": "camelCase" | |
} | |
], | |
"@angular-eslint/component-selector": [ | |
"error", | |
{ | |
"type": "element", | |
"prefix": "app", | |
"style": "kebab-case" | |
} | |
] | |
} | |
}, | |
{ | |
"files": [ | |
"*.html" | |
], | |
"extends": [ | |
"plugin:@angular-eslint/template/recommended" | |
], | |
"rules": { | |
"@angular-eslint/template/no-duplicate-attributes": "error", | |
"@angular-eslint/template/use-track-by-function": "error", | |
"@angular-eslint/template/accessibility-alt-text": "error", | |
"@angular-eslint/template/eqeqeq": "error", | |
"@angular-eslint/template/click-events-have-key-events": "error", | |
"@angular-eslint/template/mouse-events-have-key-events": "error", | |
"@angular-eslint/template/no-any": "error", | |
"@angular-eslint/template/accessibility-valid-aria": "error", | |
"@angular-eslint/template/accessibility-label-has-associated-control": "error", | |
"@angular-eslint/template/no-call-expression": "error" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instalação:
ng add @angular-eslint/schematics
npm i eslint-config-prettier eslint-plugin-prettier -D