You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How are you deploying your application? (if relevant)
No response
Describe the Bug
Our company has a standard eslint config which has a dependency on eslint-plugin-react-hooks@^4.3.0. The eslint-config-next package has a dependency on eslint-plugin-react-hooks@4.3.0 rather than using a semver range. This is causing issues for our users where eslint-plugin-react-hooks@4.4.0 is installed due to semver range matching in our config but then installed a second time as 4.3.0. The inability for eslint to locate a single package of this plugin then has downstream issues including actually breaking next's ability to build. We have to walk our developers through a process to get these dependencies deduped.
Could next use semver ranges for dependencies instead of pinned versions?
Expected Behavior
If eslint-config-next used semver ranges, then npm would have resolved the existing installed eslint-plugin-react-hooks@4.3.0 as semver-compatible and reused that dependency rather than deeming it necessary to install a separate eslint-plugin-react-hooks version in a nested node_modules.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
I verified that the issue exists in Next.js canary releaseProvide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Our company has a standard eslint config which has a dependency on
eslint-plugin-react-hooks@^4.3.0
. Theeslint-config-next
package has a dependency oneslint-plugin-react-hooks@4.3.0
rather than using a semver range. This is causing issues for our users whereeslint-plugin-react-hooks@4.4.0
is installed due to semver range matching in our config but then installed a second time as4.3.0
. The inability for eslint to locate a single package of this plugin then has downstream issues including actually breaking next's ability to build. We have to walk our developers through a process to get these dependencies deduped.Could next use semver ranges for dependencies instead of pinned versions?
Expected Behavior
If
eslint-config-next
used semver ranges, thennpm
would have resolved the existing installedeslint-plugin-react-hooks@4.3.0
as semver-compatible and reused that dependency rather than deeming it necessary to install a separateeslint-plugin-react-hooks
version in a nestednode_modules
.To Reproduce
npm init -y
npm i -D eslint-config-godaddy-react
npm i -D eslint-config-next
npm ls eslint-plugin-react-hooks
The text was updated successfully, but these errors were encountered: