import-js / eslint-plugin-import

ESLint plugin with rules that help validate proper imports.
MIT License
5.57k stars 1.57k forks source link

eslint > 9 as peer dependency of eslint #3053

Closed ritamcastro closed 2 months ago

ritamcastro commented 2 months ago

Hello,

We noticed that this plugin is now supporting the flat config and we tried it out.

We have started a clean eslint setup (following https://eslint.org/docs/latest/use/getting-started) and got these dependencies in the package.json

"devDependencies": {
    "@eslint/js": "^9.9.1",
    "eslint": "^9.9.1",
    "globals": "^15.9.0",
    "typescript-eslint": "^8.4.0"
  }

When we tried to install the eslint-plugin-import we got the following error:

❯ npm i -D eslint-plugin-import
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: sandbox@1.0.0
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
npm error Could not resolve dependency:
npm error peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from eslint-plugin-import@2.30.0
npm error node_modules/eslint-plugin-import
npm error   dev eslint-plugin-import@"*" 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.
npm error
npm error
npm error For a full report see:
npm error xxxx/2024-09-05T16_11_05_277Z-eresolve-report.txt

npm error A complete log of this run can be found in: xxxx2024-09-05T16_11_05_277Z-debug-0.log

Are there any plans to upgrade the peer dependency of this plugin to eslint >9?

Thank you very much! 🙏

ljharb commented 2 months ago

Yes, see #2948.

Until then, you can’t use eslint 9 with this plugin.

ritamcastro commented 2 months ago

Thanks a lot for the fast reply! 🙏

We did see that thread, but since the flat config came to play, we assumed that eslint 9 would also work. Out of curiosity, do you have any idea when v9 will be supported? Ball park it - next week, month, quarter, year?

Thanks for the support :)

ljharb commented 2 months ago

eslint 8 is when flat config was added.

I have no timeline - but obviously as soon as it can be completed would be ideal.