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 peer dependency causing issues #321

Open
fab1o opened this issue Apr 11, 2022 · 2 comments
Open

ESLint peer dependency causing issues #321

fab1o opened this issue Apr 11, 2022 · 2 comments
Labels

Comments

@fab1o
Copy link

fab1o commented Apr 11, 2022

I've been using this plugin version 8.0.0 in my projects to run ESLint 6.8.0 for over a year and it was working fine until today. Because today, I ran a fresh npm install

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-plugin-mocha@8.0.0
npm ERR! Found: eslint@6.8.0
npm ERR! node_modules/eslint
npm ERR!   eslint@"6.8.0" from the root project

So this comment is not 100% correct. As showed above, it does not only cause a warning, it causes an error

My point is: if 8.0.0 doesn't require a higher version of ESLint (and thus we could still use an earlier version) then there should not be a peerDependency or that should be of a version that is still compatible.

@fab1o fab1o changed the title Peer dependency causing issues ESLint peer dependency causing issues Apr 11, 2022
@lo1tuma
Copy link
Owner

lo1tuma commented Apr 12, 2022

ESLint v7 is already declared as a peer dependency since eslint-plugin-mocha v7. So this is nothing new.

The comment you mentioned seems also correct given the context that it was written 2 years ago. Back then npm ignored peerDependency incompatibilities and printed only a warning. This has changed with npm v7 which now automatically installs missing peer dependencies. So my guess is that you are now using npm > 7. Could that be the case?

@fab1o
Copy link
Author

fab1o commented Apr 12, 2022

It sure is. I was able to downgrade this to 6.3.0 without issues so that solved it, but I just wanted to leave this here for future reference and knowledge sharing.

If you could release a 8.0.1 with a peerDependency ESLint >=6 that would be another way of solving this (since it supports ESLint 6 right?) but downgrading was okay for me for now so not a big deal.

Eventually I'd like to upgrade ESLint and all plugins, but this is the only one that caused this issue

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

No branches or pull requests

2 participants