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

Peer dependency warnings on ESLint v9 #525

Closed
MikeMcC399 opened this issue May 7, 2024 · 7 comments
Closed

Peer dependency warnings on ESLint v9 #525

MikeMcC399 opened this issue May 7, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@MikeMcC399
Copy link
Contributor

Issue

Installing eslint-doc-generator on ESLint v9 shows peer dependency warnings

npm WARN ERESOLVE overriding peer dependency

Desired behavior

Installing the current version of eslint-doc-generator on ESLint v9 should show no peer dependency warnings.

Steps to reproduce

Ubuntu 22.04.4 LTS, Node.js 20.12.2 LTS

mkdir eslint-doc-gen-test
cd eslint-doc-gen-test
git init
npm init -y
npm install eslint@9 eslint-doc-generator@latest --save-dev
npm ci

Logs

$ npm ci
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.2.0" from the root project
npm WARN   2 more (@eslint-community/eslint-utils, eslint-doc-generator)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm WARN node_modules/eslint-doc-generator/node_modules/@typescript-eslint/utils
npm WARN   @typescript-eslint/utils@"^5.38.1" from [email protected]
npm WARN   node_modules/eslint-doc-generator
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/eslint
npm WARN   peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm WARN   node_modules/eslint-doc-generator/node_modules/@typescript-eslint/utils
npm WARN     @typescript-eslint/utils@"^5.38.1" from [email protected]
npm WARN     node_modules/eslint-doc-generator

added 159 packages, and audited 160 packages in 2s

37 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Environment / versions

Component version
Ubuntu 22.04.4 LTS
Node.js v20.12.2 LTS
ESLint v9.2.0
eslint-doc-generator 1.7.0

Other

See also

@ljharb
Copy link

ljharb commented May 7, 2024

peer dep warnings mean it’s not yet compatible and you shouldn’t yet be trying to install them together.

see #376 as well.

@MikeMcC399
Copy link
Contributor Author

@ljharb

peer dep warnings mean it’s not yet compatible and you shouldn’t yet be trying to install them together.

To make it clearer I will add a new issue requesting support of ESLint 9.x by eslint-doc-generator.
This issue was just to highlight the problem and provide steps to reproduce.

@MikeMcC399
Copy link
Contributor Author

@bmish
Copy link
Owner

bmish commented May 8, 2024

I'd like to fix this warning, but it will require a lot of dependency updates as well as a major release to drop old Node versions, so it may not be easy/immediate.

This also sounds like more of an issue with incompatibility between TypeScript dependencies than an actual issue with ESLint v9.

It's not great, but you may be able to use npm ci --force for now.

@bmish bmish added the bug Something isn't working label May 8, 2024
@MikeMcC399
Copy link
Contributor Author

@bmish

It does seem more of a cosmetic issue, although I didn't dig into whether the TypeScript dependencies break anything in practice. I appreciate that you are tied down with dependencies and breaking changes, so I'm not expecting a quick fix.

It's not actually necessary to use npm ci --force as npm only comes up with a warning, not a fatal error.

I would like to have things clean in CI, i.e. no peer dependency warnings, so I'm going to hold back on installing the eslint-doc-generator in CI and just use it manually for the moment.

@MikeMcC399
Copy link
Contributor Author

Workaround

Provided you don't have eslint@9 installed globally, you can install eslint-doc-generator globally, avoiding peer dependency warnings, and use it to generate documentation for ESLint v9 plugins.

npm install eslint-doc-generator --global

@MikeMcC399
Copy link
Contributor Author

@MikeMcC399 MikeMcC399 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants