Skip to content

[Bug]: peer dependency error with eslint@9 #3735

@johnhunter

Description

@johnhunter

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

We support eslint@9 but the peerDependencies do not include it. This causes npm import failure when using current npm versions.

Steps to repro:

  1. Update to eslint@9
  2. Install [email protected]
  3. Examine the console output

Expected:
eslint-plugin-react install ok

Actual:
eslint-plugin-react install fails with

npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8" from [email protected]
npm ERR! node_modules/eslint-plugin-react
npm ERR!   dev eslint-plugin-react@"7.34.1" from the root project

Environment:
node: v20.12.2
npm: 10.5.0

The fail will downgrade to a warning if npm legacy-peer-deps is used, but we should address the root cause.

Expected Behavior

eslint-plugin-react should install ok

eslint-plugin-react version

v7.34.1

eslint version

v9.0.0

node version

v20.12.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions