Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint v9.0.0 compatibility #1755

Closed
1 task done
Tracked by #9496
moh4sa opened this issue Apr 6, 2024 · 6 comments
Closed
1 task done
Tracked by #9496

eslint v9.0.0 compatibility #1755

moh4sa opened this issue Apr 6, 2024 · 6 comments
Labels
package: builder Angular CLI builder which enables executing ESLint in Angular CLI workspaces triage This issue needs to be looked at and categorized by a maintainer

Comments

@moh4sa
Copy link

moh4sa commented Apr 6, 2024

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
  • I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.
@moh4sa moh4sa added package: builder Angular CLI builder which enables executing ESLint in Angular CLI workspaces triage This issue needs to be looked at and categorized by a maintainer labels Apr 6, 2024
@nzacca
Copy link
Contributor

nzacca commented Apr 19, 2024

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)

@moh4sa
Copy link
Author

moh4sa commented Apr 24, 2024

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

@JamesHenry
Copy link
Member

@moh4sa It is dependent on typescript-eslint/typescript-eslint#8211

Most likely ESLint 9 support will land via typescript-eslint v8 in angular-eslint v18

@moh4sa
Copy link
Author

moh4sa commented May 16, 2024

@JamesHenry
Copy link
Member

Please see the description on #1830 for full details on what ESLint v9 rollout looks like

@JamesHenry
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: builder Angular CLI builder which enables executing ESLint in Angular CLI workspaces triage This issue needs to be looked at and categorized by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants