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/[email protected] does not satisfy @types/[email protected]
npm error Missing: @types/[email protected] 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/[email protected] /Users/foxriver76/workspaces/ioBroker.js-controller/node_modules/@types/eslint
iobroker.js-controller-mono@ /Users/foxriver76/workspaces/ioBroker.js-controller
├─┬ @iobroker/[email protected]
│ └─┬ [email protected]
│   └── @types/[email protected] invalid: ">=8.0.0" from node_modules/eslint-plugin-prettier
└─┬ [email protected]
  └─┬ [email protected]
    └── @types/[email protected] 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