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

Conflicts with @types/eslint due to eslint-formatter-pretty dependency #221

Open
foxriver76 opened this issue Sep 9, 2024 · 3 comments
Open

Comments

@foxriver76
Copy link

Due to the usage of eslint-formatter-pretty in version 4 I get some conflicts with newer versions of eslint plugins. Here with npm ci

npm error code EUSAGE
npm error
npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm error
npm error Invalid: lock file's @types/eslint@7.29.0 does not satisfy @types/eslint@9.6.1
npm error Missing: @types/eslint@7.29.0 from lock file

In the end I would say, that eslint-formatter-pretty should not specify any types package as a prod dependency.

foxriver76@MBPvonMoritz2 ioBroker.js-controller % npm ls @types/eslint
npm error code ELSPROBLEMS
npm error invalid: @types/eslint@7.29.0 /Users/foxriver76/workspaces/ioBroker.js-controller/node_modules/@types/eslint
iobroker.js-controller-mono@ /Users/foxriver76/workspaces/ioBroker.js-controller
├─┬ @iobroker/eslint-config@0.1.2
│ └─┬ eslint-plugin-prettier@5.2.1
│   └── @types/eslint@7.29.0 invalid: ">=8.0.0" from node_modules/eslint-plugin-prettier
└─┬ tsd@0.31.2
  └─┬ eslint-formatter-pretty@4.1.0
    └── @types/eslint@7.29.0 deduped invalid: ">=8.0.0" from node_modules/eslint-plugin-prettier
@sindresorhus
Copy link
Collaborator

In the end I would say, that eslint-formatter-pretty should not specify any types package as a prod dependency.

This would be wrong because it uses types from that package in prod.

@foxriver76
Copy link
Author

foxriver76 commented Sep 9, 2024

In the end I would say, that eslint-formatter-pretty should not specify any types package as a prod dependency.

This would be wrong because it uses types from that package in prod.

Where do you find it using types in Prod and how would that look like tbh I cannot imagine as types can only be used on the type level? Likely I haven't inspected what this package does.

@foxriver76
Copy link
Author

However, if this is the case, then likely it should be followed the recommendations for such scenarios. Which from my point of view is specifying it as a peer dep and with only a lower bound on the version, like also done here https://github.com/prettier/eslint-plugin-prettier/blob/51324d9cdf8b883e2a392904d0f73da9eca6a808/package.json#L52

As you are deeper in the project please let me know what you think @sindresorhus

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