Repository navigation
fix(ci): repair Node.js CI by resolving the ESLint 10 dependency conflict - #41
Conversation
…lict
`npm ci` was failing on every push to main with ERESOLVE: Dependabot had
bumped eslint to ^10.5.0 while eslint-plugin-react-hooks stayed at ^4.6.0,
whose peer range tops out at eslint 8.
- Bump eslint-plugin-react-hooks to ^7.1.1 (peer range covers eslint 10)
- Migrate .eslintrc.cjs to flat config (eslint.config.js); eslintrc support
was removed in ESLint 9/10, so `npm run lint` could not run at all
- Drop the `--ext` flag from the lint script (removed in ESLint 9+)
- Add @eslint/js and globals as explicit devDependencies for the flat config
- Attach `cause` to the two rethrown lookup errors, satisfying the new
preserve-caught-error core rule and preserving the original stack
- Raise the TS target/lib to ES2022 so `new Error(msg, { cause })` typechecks
- Drop Node 18 from the CI matrix: vite 8 requires ^20.19 || >=22.12 and
eslint 10 requires ^20.19 || ^22.13 || >=24
Verified locally: `npm ci`, `npm run build`, and `npm run lint` all pass.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QbzWRqDmYoAHKw2SwyQeCB
Dependency ReviewThe following issues were found:
OpenSSF ScorecardScorecard details
Scanned Files
|
|
There was a problem hiding this comment.
🟢 Ready to approve
The changes consistently address the reported CI install/lint breakages by aligning dependencies, ESLint configuration, and CI Node versions with the toolchain’s supported ranges.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR repairs the Node.js CI pipeline by resolving an ESLint 10 peer-dependency conflict and updating the repo’s linting setup to ESLint’s flat config format, while aligning CI/runtime targets with the Node versions required by current tooling (Vite 8 / ESLint 10).
Changes:
- Upgrades
eslint-plugin-react-hooks(and adds@eslint/js+globals) to resolve the ESLint 10 peer dependency ERESOLVE failure. - Migrates ESLint configuration from
.eslintrc.cjstoeslint.config.js(flat config) and updates thelintscript accordingly. - Updates CI Node matrix and TypeScript target/lib to support
Error(..., { cause })and newer toolchain requirements.
File summaries
| File | Description |
|---|---|
tsconfig.json |
Bumps TS target/lib to ES2022 to typecheck Error cause options. |
src/utils/identifierLookup.ts |
Attaches cause when rethrowing lookup failures to preserve original errors under ESLint 10 rules. |
package.json |
Updates lint script, adds flat-config imports, and bumps eslint-plugin-react-hooks to a version compatible with ESLint 10. |
package-lock.json |
Locks updated dependency graph consistent with the ESLint/react-hooks upgrade and new devDependencies. |
eslint.config.js |
Introduces ESLint flat config preserving prior rule intent (hooks + refresh + TS rules). |
.github/workflows/node.js.yml |
Updates CI matrix to Node 20/22/24 to match supported engines for Vite/ESLint. |
.eslintrc.cjs |
Removes legacy ESLint config replaced by the new flat config. |
Review details
- Files reviewed: 5/7 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.



Problem
Node.js CIhas been failing on every push tomain. Thenpm cistep aborts withERESOLVE:Dependabot bumped
eslintto^10.5.0, buteslint-plugin-react-hooksstayed at^4.6.0, whose peer range tops out at eslint 8. Nothing installs, so the build never runs.Fixing that surfaced two more latent breakages:
npm run lintcould not run at all (ESLint 9/10 removed.eslintrcsupport and the--extflag), and the CI matrix still pinned Node 18, which neither vite 8 nor eslint 10 supports.Changes
eslint-plugin-react-hooksto^7.1.1— its peer range covers eslint 10.eslintrc.cjsto flat config (eslint.config.js), preserving the existing rule set--extflag from thelintscript (removed in ESLint 9+)@eslint/jsandglobalsas explicit devDependencies, since the flat config imports them directlycauseto the two rethrown lookup errors insrc/utils/identifierLookup.ts, satisfying ESLint 10's newpreserve-caught-errorrule and preserving the original errortarget/libto ES2022 sonew Error(msg, { cause })typechecks20.x, 22.x, 24.x) — vite 8 requires^20.19 || >=22.12and eslint 10 requires^20.19 || ^22.13 || >=24Verification
Run locally on Node 22:
npm ci— succeeds, no ERESOLVEnpm run build— succeedsnpm run lint— clean, 0 errors and 0 warnings (previously could not run at all)The rule set is deliberately held at the previous behaviour.
eslint-plugin-react-hooksv7'srecommendedpreset pulls in a large set of new React Compiler rules; this PR keepsrules-of-hooksas an error andexhaustive-depsas a warning so the upgrade stays scoped to fixing CI. Adopting the wider preset is a reasonable follow-up.Generated by Claude Code