Skip to content

fix: resolve npm peer dependency conflict blocking CI#93

Merged
iqbalhasandev merged 1 commit intomainfrom
fix/npm-peer-dep-conflict-eslint
Apr 12, 2026
Merged

fix: resolve npm peer dependency conflict blocking CI#93
iqbalhasandev merged 1 commit intomainfrom
fix/npm-peer-dep-conflict-eslint

Conversation

@iqbalhasandev
Copy link
Copy Markdown
Member

Summary

  • Add .npmrc with legacy-peer-deps=true to resolve peer dependency conflict between eslint-plugin-react@7.x and eslint@10
  • eslint-plugin-react v7 only supports up to eslint@^9.7, causing npm ci to fail in CI

Root cause

eslint-plugin-react@7.37.5 declares a peer dependency of eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" which excludes eslint@10. Setting legacy-peer-deps=true allows npm to resolve this without erroring.

Copilot AI review requested due to automatic review settings April 12, 2026 05:22
@iqbalhasandev iqbalhasandev merged commit a82ceab into main Apr 12, 2026
12 checks passed
@iqbalhasandev iqbalhasandev deleted the fix/npm-peer-dep-conflict-eslint branch April 12, 2026 05:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .npmrc enabling legacy-peer-deps=true to 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
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
legacy-peer-deps=true

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
legacy-peer-deps=true
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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

Successfully merging this pull request may close these issues.

2 participants