angular-eslint
angular-eslint copied to clipboard
eslint v9.0.0 compatibility
Description and reproduction of the issue
eslint latest version isn't compatible with @angular-eslint/builder requesting you to update to be able to benefit from eslint latest features
peer eslint@"^7.20.0 || ^8.0.0" from @angular-eslint/[email protected]
npm ERR! node_modules/@angular-eslint/builder
Versions
| package | version |
|---|---|
@angular-eslint/builder |
17.3.0 |
ESLint |
9.0.0 |
node |
20.9.0 |
Angular CLI: 17.3.3
Node: 20.9.0
Package Manager: npm 10.5.0
OS: darwin arm64
Angular: 17.3.3
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1703.3
@angular-devkit/build-angular 17.3.3
@angular-devkit/core 17.3.3
@angular-devkit/schematics 17.3.3
@schematics/angular 17.3.3
rxjs 7.8.1
typescript 5.4.4
zone.js 0.14.4
- [x] I have updated to the latest supported version of the packages and checked my
ng versionoutput per the instructions given here.
template-parser may also need to be updated to export meta property for the parser. We had to do this as a workaround to get template linting working with flat configs:
const angulareslint = require("@angular-eslint/template-parser");
...
{
// WORKAROUND Fix for missing meta property on the template-parser.
files: ["**/*.html"],
languageOptions: {
parser: {
meta: {
name: "@angular-eslint/template-parser",
version: "17.3.0",
},
...angulareslint,
},
},
},
Without this fix, you receive the following error: Could not serialize parser object (missing 'meta' object)
@JamesHenry As I can see, you have closed the pull request that fixed the issue. Will this be resolved soon?
@moh4sa It is dependent on https://github.com/typescript-eslint/typescript-eslint/issues/8211
Most likely ESLint 9 support will land via typescript-eslint v8 in angular-eslint v18
@JamesHenry https://github.com/typescript-eslint/typescript-eslint/issues/8211 has been merged
Please see the description on https://github.com/angular-eslint/angular-eslint/pull/1830 for full details on what ESLint v9 rollout looks like
ESLint v9 and Flat Config is now supported in the latest v18 release:
https://github.com/angular-eslint/angular-eslint/releases/tag/v18.0.0
Please review the updated documentation in the repo via the README.md