0.1.7 • Published 2 years ago
@medienwerft/eslint-config-angular v0.1.7
eslint configuration for angular
To ensure a high and consistent code quality for .ts, .js, .html we use eslint.
This eslint extends the ruling conventions from angular linting and prettier. Therefore, you must have prettier installed in your project.
To check the rules see .eslintrc.json. If for some reason a rule doesn't fit your project, you can override the specific rule in the .eslintrc.json (as demonstrated below) of your project.
Installing @medienwerft/eslint-config-angular package
npm install @medienwerft/eslint-config-angular prettier --save-devCreate config
1- run ng add @angular-eslint/schematics to add linting to your angular project and create the .eslintrc.json automatically
2- add the following to your .eslintrc.json file:
{
"extends": ["@medienwerft/eslint-config-angular/.eslintrc"]
}Use
run lint over the whole project:
ng lintrun and fix code:
ng lint --fixadding eslint to lintstagedrc
{
"*{.ts,.js,.html}": "eslint --fix",
... other lint staged commands,
}