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

Cannot install with ESLint 4 #355

Open
MikeMcC399 opened this issue Apr 29, 2024 · 2 comments
Open

Cannot install with ESLint 4 #355

MikeMcC399 opened this issue Apr 29, 2024 · 2 comments

Comments

@MikeMcC399
Copy link

Issue

The README > Install and configure for eslint-plugin-mocha@10.4.3 says:

This plugin requires ESLint 4.0.0 or later.

however attempting to install with ESLint 4.0.0 fails with:

npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">=7.0.0" from eslint-plugin-mocha@10.4.3

Steps to reproduce

On Ubuntu 22.04.4 LTS with Node.js 20.12.2 LTS

mkdir eslint-plugin-mocha-test
cd eslint-plugin-mocha-test
git init
npm init -y
npm install eslint@4.0.0 eslint-plugin-mocha@10 -D

Note the error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree

Logs

$ npm install eslint@4 eslint-plugin-mocha@10 -D
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: eslint-plugin-mocha-test@1.0.0
npm ERR! Found: eslint@4.19.1
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">=7.0.0" from eslint-plugin-mocha@10.4.3
npm ERR! node_modules/eslint-plugin-mocha
npm ERR!   dev eslint-plugin-mocha@"10" 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.

Suggestion

  • PR ESLint 7 #247 in May 2020 updated peerDependencies from
    eslint >=4.0.0 to
    eslint >=7.0.0
    so it would make sense to update the README accordingly.

Suggest to update the README > Install and configure section to say:

This plugin requires ESLint 7.0.0 or later.

@lo1tuma
Copy link
Owner

lo1tuma commented Apr 29, 2024

Good catch, thank you. Since the breaking change was announced via the release notes, I think we are good and just need to update the README, as you suggested.

@MikeMcC399
Copy link
Author

@lo1tuma

Good catch, thank you. Since the breaking change was announced via the release notes, I think we are good and just need to update the README, as you suggested.

Yes, I see this under the release notes for 7.0.0. Thanks for pointing that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants