mightyiam / eslint-config-love

A TypeScript ESLint config that loves you
MIT License
757 stars 65 forks source link

ESLint 9 #1589

Open kutsan opened 3 months ago

kutsan commented 3 months ago

It would be awesome to add ESLint 9 support.

mightyiam commented 3 months ago

Waiting for all plugins to support it.

balboFK commented 1 month ago

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 commented 1 month ago

Two things need to happen:

  1. 1699 (possibly this weekend)

  2. one of
    1. https://github.com/import-js/eslint-plugin-import/issues/2948
    2. migrating to a fork of the above
balboFK commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

mightyiam commented 1 month ago

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 commented 1 month ago

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 commented 4 weeks ago

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: eslint-plugin-import@2.29.1
npm error Found: eslint@9.9.1
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/eslint-utils@4.4.0
npm error   node_modules/@eslint-community/eslint-utils
npm error     @eslint-community/eslint-utils@"^4.4.0" from @typescript-eslint/utils@8.2.0
npm error     node_modules/@typescript-eslint/utils
npm error       @typescript-eslint/utils@"8.2.0" from @typescript-eslint/eslint-plugin@8.2.0
npm error       node_modules/@typescript-eslint/eslint-plugin
npm error         @typescript-eslint/eslint-plugin@"8.2.0" from typescript-eslint@8.2.0
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 eslint@9.9.1
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 eslint-plugin-import@2.29.1
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: eslint@8.57.0
npm error node_modules/eslint
npm error   peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from eslint-plugin-import@2.29.1
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 commented 4 weeks ago

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 commented 4 weeks ago

@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 https://github.com/import-js/eslint-plugin-import/pull/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 commented 4 weeks ago

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

mightyiam commented 4 weeks ago

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

jsec commented 3 weeks ago

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

Release Notes

pedrodesu commented 1 week ago

any updates on eslint 9 support?

TyIsI commented 5 days ago

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 commented 4 days ago

any updates on eslint 9 support?

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

Yes, what @TyIsI wrote.