Skip to content

Conversation

wojtekmaj
Copy link
Contributor

Fixes the following warning e.g. in Yarn:

➤ YN0002: │ my-project@workspace:. doesn't provide eslint-plugin-import (p2dacd), requested by eslint-import-resolver-typescript

The downside is that in order to support "either or", we need to make both eslint-plugin-import and eslint-plugin-i optional peerDependencies.

Fixes the following warning e.g. in Yarn:

➤ YN0002: │ my-project@workspace:. doesn't provide eslint-plugin-import (p2dacd), requested by eslint-import-resolver-typescript

The downside is that in order to support "either or", we need to make both eslint-plugin-import and eslint-plugin-i optional peerDependencies.
@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2023

⚠️ No Changeset found

Latest commit: 69f5773

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@wojtekmaj
Copy link
Contributor Author

pnpm changeset command does not work for me, sorry.

 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command "changeset" not found

@SukkaW
Copy link
Collaborator

SukkaW commented Oct 23, 2023

@wojtekmaj Marking a peerDeps optional might not make npm skip install it. I've opened another PR #248 to remove eslint-plugin-import from peerDeps instead.

@JounQin
Copy link
Collaborator

JounQin commented Oct 23, 2023

@wojtekmaj Sorry I didn't notice this PR for a long time, let's continue discussion at #248 (comment)

@JounQin
Copy link
Collaborator

JounQin commented Oct 23, 2023

@wojtekmaj Marking a peerDeps optional might not make npm skip install it. I've opened another PR #248 to remove eslint-plugin-import from peerDeps instead.

I don't understand, as per https://docs.npmjs.com/cli/v10/configuring-npm/package-json#peerdependenciesmeta I believe optional will not install peer dependency automatically.

@wojtekmaj
Copy link
Contributor Author

Ah yes, this may be Yarn specific. Stupid NPM and their stupid peerDependencies auto install :/

@wojtekmaj wojtekmaj closed this Oct 23, 2023
@wojtekmaj wojtekmaj deleted the fix-peerdep-warning branch October 23, 2023 07:58
@kurtextrem
Copy link
Contributor

Why can't we merge this for npm users? Making it optional should allow new users to avoid installing eslint-plugin-import. If its different for yarn or other package managers its unfortunate, but a win for one user base is still a win.

@JounQin
Copy link
Collaborator

JounQin commented Nov 16, 2023

@kurtextrem eslint-plugin-i is recommended to be installed as an alias for eslint-plugin-import, so npm i -D eslint-plugin-import@eslint-plugin-i@latest will just work well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants