fix: resolve npm peer dependency conflict blocking CI#93
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to unblock CI by configuring npm to bypass strict peer-dependency resolution so npm ci can succeed despite ESLint plugin peer-range conflicts.
Changes:
- Add a repo-level
.npmrcenablinglegacy-peer-deps=trueto avoid install-time failures from peer dependency conflicts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1 @@ | |||
| legacy-peer-deps=true | |||
There was a problem hiding this comment.
Setting legacy-peer-deps=true disables peer-dependency enforcement for all installs in this repo, which can mask real incompatibilities (not just ESLint) and lead to broken tooling/runtime behavior that only shows up later. Prefer resolving the underlying mismatch by aligning versions (e.g., downgrade eslint to a range supported by the React/React-Hooks plugins, or upgrade those plugins to versions that explicitly support eslint@10), and use legacy-peer-deps only as a temporary/CI-only workaround if unavoidable (document it with a comment in this file).
| legacy-peer-deps=true |
| @@ -0,0 +1 @@ | |||
| legacy-peer-deps=true | |||
There was a problem hiding this comment.
The PR description attributes the peer-dependency conflict only to eslint-plugin-react, but this repo also uses eslint-plugin-react-hooks@7.0.1, which (per its peerDependency range) does not declare support for eslint@10 either. Please update the PR description/root-cause explanation (or dependency plan) so it accurately reflects all conflicting peers being bypassed by legacy-peer-deps.
Summary
.npmrcwithlegacy-peer-deps=trueto resolve peer dependency conflict betweeneslint-plugin-react@7.xandeslint@10eslint-plugin-reactv7 only supports up toeslint@^9.7, causingnpm cito fail in CIRoot cause
eslint-plugin-react@7.37.5declares a peer dependency ofeslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"which excludeseslint@10. Settinglegacy-peer-deps=trueallows npm to resolve this without erroring.