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-config-next to have eslint ^9.x.x+ as peerDependencies #64853

Closed
Tracked by #12
alvinsjoy opened this issue Apr 22, 2024 · 4 comments
Closed
Tracked by #12

eslint-config-next to have eslint ^9.x.x+ as peerDependencies #64853

alvinsjoy opened this issue Apr 22, 2024 · 4 comments
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. linear: next Confirmed issue that is tracked by the Next.js team. Linting Related to `next lint` or ESLint with Next.js. locked

Comments

@alvinsjoy
Copy link

alvinsjoy commented Apr 22, 2024

Link to the code that reproduces this issue

https://github.com/alvinsjoy/PortfolioWebsite/tree/renovate/major-eslint-monorepo

To Reproduce

in package.json:

"devDependencies": {
    "eslint": "^9.0.0",
    "eslint-config-next": "14.2.2",
}

Current vs. Expected behavior

Current behaviour:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @typescript-eslint/parser@6.21.0
npm WARN Found: eslint@9.1.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^9.0.0" from the root project
npm WARN   2 more (@eslint-community/eslint-utils, eslint-import-resolver-typescript)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/parser@6.21.0
npm WARN node_modules/@typescript-eslint/parser
npm WARN   @typescript-eslint/parser@"^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0" from eslint-config-next@14.2.2
npm WARN   node_modules/eslint-config-next
npm WARN 
npm WARN Conflicting peer dependency: eslint@8.57.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/parser@6.21.0
npm WARN   node_modules/@typescript-eslint/parser
npm WARN     @typescript-eslint/parser@"^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0" from eslint-config-next@14.2.2
npm WARN     node_modules/eslint-config-next
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: eslint-config-next@14.2.2
npm ERR! Found: eslint@9.1.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^9.0.0" from the root project
npm ERR!   peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
npm ERR!   node_modules/@eslint-community/eslint-utils
npm ERR!     @eslint-community/eslint-utils@"^4.2.0" from eslint@9.1.0
npm ERR!   1 more (eslint-import-resolver-typescript)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.23.0 || ^8.0.0" from eslint-config-next@14.2.2
npm ERR! node_modules/eslint-config-next
npm ERR!   dev eslint-config-next@"14.2.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: eslint@8.57.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^7.23.0 || ^8.0.0" from eslint-config-next@14.2.2
npm ERR!   node_modules/eslint-config-next
npm ERR!     dev eslint-config-next@"14.2.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/renovate/cache/others/npm/_logs/2024-04-21T00_03_07_604Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-04-21T00_03_07_604Z-debug-0.log

Expected behaviour:

eslint-config-next should support eslint v9

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home Single Language
Binaries:
  Node: 21.7.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.4
  eslint-config-next: 14.1.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

create-next-app, Linting

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

Link to previous issue by @VincentLu91: #64833
Discussion: #64269

NEXT-3315

@alvinsjoy alvinsjoy added the bug Issue was opened via the bug report template. label Apr 22, 2024
@github-actions github-actions bot added create-next-app Related to our CLI tool for quickly starting a new Next.js application. Linting Related to `next lint` or ESLint with Next.js. labels Apr 22, 2024
@Willem-Jaap
Copy link
Contributor

I don't think just adding eslint 9 as an allowed peer dependency will work. AFAIK Eslint 9 has quite a few breaking changes and a new config API: https://eslint.org/blog/2024/04/eslint-v9.0.0-released/

Related: #64409

@henrikvtcodes
Copy link

Yeah, the plugin & config have to be rewritten with the new ESLint API. I'd do it but there's no input from core maintainers on this. Might just do it and make a PR anyway.

@henrikvtcodes
Copy link

Just found #64251

@samcx samcx added the linear: next Confirmed issue that is tracked by the Next.js team. label May 3, 2024
Copy link
Contributor

github-actions bot commented Jun 1, 2024

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot added the locked label Jun 1, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. linear: next Confirmed issue that is tracked by the Next.js team. Linting Related to `next lint` or ESLint with Next.js. locked
Projects
None yet
Development

No branches or pull requests

4 participants