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 9 #1589

Closed
kutsan opened this issue Jun 2, 2024 · 24 comments
Closed

ESLint 9 #1589

kutsan opened this issue Jun 2, 2024 · 24 comments

Comments

@kutsan
Copy link

kutsan commented Jun 2, 2024

It would be awesome to add ESLint 9 support.

@mightyiam
Copy link
Owner

Waiting for all plugins to support it.

@balboFK
Copy link

balboFK commented Aug 1, 2024

Just saw that Typescript-Eslint released they v8 yesterday.
@mightyiam when you say "all plugins" do you mean mostly the major ones, or any specific ones?
I was wondering when i could change to use ESlint 9, and love and also ts-eslint, since they are the major ones that my project runs on.

Thank you.

@mightyiam
Copy link
Owner

Two things need to happen:

  1. chore(deps): update dependency typescript-eslint to v8 - autoclosed #1699 (possibly this weekend)
  2. one of
    1. Support eslint v9 import-js/eslint-plugin-import#2948
    2. migrating to a fork of the above

@balboFK
Copy link

balboFK commented Aug 1, 2024

Got it, seems to be a heated discussion on eslint-plugin-import, so a fork might be a viable solution.
I'll keep following the progress.

Thank you!

@mightyiam
Copy link
Owner

Now that we have typescript-eslint v8, the remaining blocker is eslint-plugin-import. And I'm not sure what to do about that except for waiting. The fork could work, but I feel reluctant. Any opinions?

@SimpleCreations
Copy link

@mightyiam perhaps we could import this plugin through compat layers as suggested in this comment?

@mightyiam
Copy link
Owner

https://github.com/eslint/rewrite/tree/9250f2842456dff373508dce50cff536e32d8686/packages/compat

usage seems trivial. I wonder though how do we know that all fixed rules still work...

@pnodet
Copy link

pnodet commented Aug 29, 2024

Hi everyone, hi @mightyiam !

Following up with this issue I created two PRs.

Since the import plugin seems to be the remaining step in order to move to eslint v9 here are both available solutions.

@mightyiam
Copy link
Owner

I'm afraid #1733 is a dead-end because it does not prevent this:

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/eslint
npm error   dev eslint@"9.9.1" from the root project
npm error   peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/[email protected]
npm error   node_modules/@eslint-community/eslint-utils
npm error     @eslint-community/eslint-utils@"^4.4.0" from @typescript-eslint/[email protected]
npm error     node_modules/@typescript-eslint/utils
npm error       @typescript-eslint/utils@"8.2.0" from @typescript-eslint/[email protected]
npm error       node_modules/@typescript-eslint/eslint-plugin
npm error         @typescript-eslint/eslint-plugin@"8.2.0" from [email protected]
npm error         node_modules/typescript-eslint
npm error       2 more (@typescript-eslint/type-utils, typescript-eslint)
npm error     @eslint-community/eslint-utils@"^4.2.0" from [email protected]
npm error     3 more (eslint-plugin-es-x, eslint-plugin-n, @typescript-eslint/utils)
npm error   10 more (@typescript-eslint/eslint-plugin, ...)
npm error
npm error Could not resolve dependency:
npm error peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from [email protected]
npm error node_modules/eslint-plugin-import
npm error   eslint-plugin-import@"^2.25.2" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/eslint
npm error   peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from [email protected]
npm error   node_modules/eslint-plugin-import
npm error     eslint-plugin-import@"^2.25.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

@mightyiam
Copy link
Owner

#1732... I'm reluctant to accept depending on hacky fork.

@pnodet I appreciate your contribution but perhaps it would be of more benefit upstream at eslint-plugin-import?

@pnodet
Copy link

pnodet commented Aug 31, 2024

@mightyiam my understanding is eslint-plugin-import would rather rewrite to eslint v9 than just patch with the compat utils.

You can see that works is in progress at import-js/eslint-plugin-import#2996

I'm afraid it might take a long time and I think I can't do much more than this to PRs in the mean time, but let me know!

@kutsan
Copy link
Author

kutsan commented Aug 31, 2024

Can we merge #1732 as a workaround until we find a more stable solution?

@mightyiam
Copy link
Owner

What about waiting for ESLint v9 support in eslint-plugin-import?

@jsec
Copy link

jsec commented Sep 3, 2024

@mightyiam eslint-plugin-import just dropped a new release supporting flat configs.

Release Notes

@pedrodesu
Copy link

any updates on eslint 9 support?

@TyIsI
Copy link

TyIsI commented Sep 23, 2024

It looks like there will be movement on that on the eslint-plugin-import side shortly!

import-js/eslint-plugin-import#3061 just got approved, which is blocking for import-js/eslint-plugin-import#2996. The latter should fix v9 support.

@mightyiam
Copy link
Owner

any updates on eslint 9 support?

Hey, sorry for not responding to this. Not sure how I missed it.

Yes, what @TyIsI wrote.

@SenseiMarv
Copy link

SenseiMarv commented Sep 30, 2024

Hi, I was just setting up a project and saw that import-js/eslint-plugin-import#2996 was merged just a few minutes ago, so nothing should block the ESLint 9 support now (after it's been released of course) 🙂

@Blargel
Copy link

Blargel commented Oct 3, 2024

A new eslint-plugin-import version has been released that supports eslint 9 now!
https://github.com/import-js/eslint-plugin-import/releases/tag/v2.31.0

@pnodet
Copy link

pnodet commented Oct 3, 2024

I believe this was already merge by the renovate bot via #1790 👍

@pnodet
Copy link

pnodet commented Oct 3, 2024

@mightyiam The package.json should be updated to reflect this

-    "eslint": "^8.0.1",
+    "eslint": ">=8.0.1",

But this would fail dependencies tests

@mightyiam
Copy link
Owner

@mightyiam
Copy link
Owner

Oh, wait. I missed #1589 (comment)

dangowans added a commit to cityssm/eslint-config-cityssm that referenced this issue Oct 8, 2024
waiting for eslint-config-love to bring in new eslint-plugin-import that now supports v9

- mightyiam/eslint-config-love#1589
- mightyiam/eslint-config-love#1497
- mightyiam/eslint-config-love#1734
mightyiam pushed a commit that referenced this issue Oct 12, 2024
eslint-config-love-release-bot bot pushed a commit that referenced this issue Oct 12, 2024
## [85.0.0](v84.1.1...v85.0.0) (2024-10-12)

### ⚠ BREAKING CHANGES

* peerDep eslint ^9.0.0
* dep eslint-plugin-import ^2.31.0

### Features

* eslint v9 ([018e202](018e202)), closes [#1589](#1589) [#1734](#1734)
@mightyiam
Copy link
Owner

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

10 participants