Angular ESLint recommended config does not include TypeScript recommended rules
See original GitHub issueDescription and reproduction of the issue
I am using ESLint config file that recommended and created using Angular ESLint schematics command:
ng add @angular-eslint/schematics
.
My eslintrc.json
file looks like:
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": ["plugin:@angular-eslint/recommended"]
}
]
}
Because the package @angular-eslint/eslint-plugin
depends on the package @typescript-eslint/eslint-plugin
I expect that Angular ESLint plugin inherits all the recommended rules from TypeScript ESLint plugin.
I mean these rules: https://github.com/typescript-eslint/typescript-eslint/blob/v5.41.0/packages/eslint-plugin/src/configs/recommended.ts
But in fact all the recommended TypeScript ESLint rules does not working.
Versions
package | version |
---|---|
@angular-eslint/eslint-plugin |
13.5.0 |
@typescript-eslint/parser |
5.41.0 |
ESLint |
7.32.0 |
node |
16.14.2 |
# Please run `npx ng version` in your project and paste the full output here:
Angular CLI: 13.3.9
Node: 16.14.2
Package Manager: npm 8.19.2
OS: darwin x64
Angular: 13.3.11
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.9
@angular-devkit/build-angular 13.3.9
@angular-devkit/core 13.3.9
@angular-devkit/schematics 13.3.9
@angular/cli 13.3.9
@schematics/angular 13.3.9
rxjs 7.5.7
typescript 4.6.4
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest supported version of the packages and checked my
ng version
output per the instructions given here.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
ESlint & Angular 13: Unable to turn off typescript- ...
It appears that when I ran the following command: ng add @angular-eslint/schematics. That the setup process did not complete.
Read more >Migrating and configuring Eslint with Angular 11
In this post we will walk through migrating and configuring an Angular 11 project to utilize ESLint and as a bonus add the...
Read more >How to use ESLint with TypeScript
ESLint is a JavaScript linter that you can use to lint either TypeScript or JavaScript code. In this post, we'll walk through how...
Read more >Writing custom TypeScript Eslint rules with unit tests for ...
ng new custom-eslint-rules –style=scss –skip-tests=true ... You can choose your own typescript settings although I recommend you set outDir ...
Read more >tslint-to-eslint-config/community
I followed the official documentation and noticed the recommended rules does turn off the "@typescript-eslint/semi" rule and even turning it on ("warn") it ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As of v15, all new workspaces will extend from the
eslint:recommended
andplugin:@typescript-eslint:recommended
configsI can see how this may give the impression that the angular-eslint recommended config extends the TypeScript recommended rules.
@JamesHenry is it intended for the angular-eslint recommended config to extend the TS recommended rules? If so, an update to the config will be required. Otherwise, perhaps an update to the docs to clarify how these configurations work.