4.0.0 • Published 2 years ago
@dscheerens/eslint-config-angular v4.0.0
Angular ESLint configuration
This NPM package contains an (opiniated) ESLint configuration for Angular.
Installation
First, make sure you have the following dev dependencies installed:
@angular-eslint/eslint-plugin@angular-eslint/eslint-plugin-template@angular-eslint/template-parser@typescript-eslint/eslint-plugin@typescript-eslint/parsereslint
You can install them all at once using the following command:
npm install --save-dev eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parserNext, install this package:
npm install --save-dev @dscheerens/eslint-config-angularUsage
Below you can find an example .eslintrc.json file that makes use of this package.
{
"root": true,
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["./tsconfig.json"],
"createDefaultProgram": true
},
"extends": ["@dscheerens/eslint-config-angular/typescript"]
},
{
"files": ["*.spec.ts"],
"extends": ["@dscheerens/eslint-config-angular/spec"]
},
{
"files": ["*.html"],
"extends": ["@dscheerens/eslint-config-angular/html"]
}
]
}