angular-eslint icon indicating copy to clipboard operation
angular-eslint copied to clipboard

eslint v9.0.0 compatibility

Open moh4sa opened this issue 1 year ago • 4 comments

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 version output per the instructions given here.

moh4sa avatar Apr 06 '24 22:04 moh4sa

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)

nzacca avatar Apr 19 '24 00:04 nzacca

@JamesHenry As I can see, you have closed the pull request that fixed the issue. Will this be resolved soon?

moh4sa avatar Apr 24 '24 08:04 moh4sa

@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 avatar May 01 '24 13:05 JamesHenry

@JamesHenry https://github.com/typescript-eslint/typescript-eslint/issues/8211 has been merged

moh4sa avatar May 16 '24 18:05 moh4sa

Please see the description on https://github.com/angular-eslint/angular-eslint/pull/1830 for full details on what ESLint v9 rollout looks like

JamesHenry avatar May 28 '24 12:05 JamesHenry

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

JamesHenry avatar May 29 '24 17:05 JamesHenry