Skip to content

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

@alvinsjoy

Description

@alvinsjoy

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/[email protected]
npm WARN Found: [email protected]
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/[email protected]
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 [email protected]
npm WARN   node_modules/eslint-config-next
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/eslint
npm WARN   peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
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 [email protected]
npm WARN     node_modules/eslint-config-next
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
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/[email protected]
npm ERR!   node_modules/@eslint-community/eslint-utils
npm ERR!     @eslint-community/eslint-utils@"^4.2.0" from [email protected]
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 [email protected]
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: [email protected]
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^7.23.0 || ^8.0.0" from [email protected]
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    LintingRelated to `next lint` or ESLint with Next.js.bugIssue was opened via the bug report template.create-next-appRelated to our CLI tool for quickly starting a new Next.js application.linear: nextConfirmed issue that is tracked by the Next.js team.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions