Created
October 31, 2021 06:20
-
-
Save gnesher/81caba778d15c14b249dbd95da0bd09f to your computer and use it in GitHub Desktop.
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.json"], | |
"createDefaultProgram": true | |
}, | |
"plugins": ["prefer-arrow", "unused-imports"], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/recommended", | |
"plugin:@angular-eslint/recommended", | |
"plugin:@angular-eslint/template/process-inline-templates", | |
"prettier" | |
], | |
"rules": { | |
"@angular-eslint/directive-selector": [ | |
"error", | |
{ | |
"type": "attribute", | |
"prefix": "app", | |
"style": "camelCase" | |
} | |
], | |
"@angular-eslint/no-output-on-prefix": 0, | |
"@typescript-eslint/no-unused-vars": "off", | |
"unused-imports/no-unused-imports": "error", | |
"unused-imports/no-unused-vars": ["error", {"args": "none"}] | |
} | |
}, | |
{ | |
"files": ["*.html"], | |
"extends": ["plugin:@angular-eslint/template/recommended", "prettier"], | |
"rules": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the code to work several libraries need to be installed:
core - eslint + typescript
npm i --save-dev eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
eslint-angular
npm i --save-dev @angular-eslint/builder @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/schematics @angular-eslint/template-parser
additional plugins
npm i --save-dev eslint-plugin-ban eslint-plugin-prefer-arrow eslint-plugin-unused-imports
prettier
npm i --save-dev prettier eslint-config-prettier