Skip to content

fix(lint): pin react hooks plugin to 7.0.1 - #11749

Closed
MumuTW wants to merge 1 commit into
cheaper-inference:release/v3.8.50from
MumuTW:MumuTW/investigate-eslint-react-hooks
Closed

MumuTW wants to merge 1 commit into
cheaper-inference:release/v3.8.50from
MumuTW:MumuTW/investigate-eslint-react-hooks

Conversation

@MumuTW

@MumuTW MumuTW commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pin eslint-plugin-react-hooks 7.0.1 as a direct devDependency
  • prevent eslint-config-next transitive range drift from changing lint policy
  • add a regression test that locks the expected version and package-lock alignment

Root cause

eslint-config-next allows eslint-plugin-react-hooks through ^7.0.0. A reused or refreshed node_modules could therefore load 7.1.1 while the repository lockfile and source remained unchanged. The 7.1 analyzer changes then surfaced hundreds of React Compiler diagnostics across unrelated dashboard files.

Verification

  • focused regression test: pass
  • npm run check:lockfile: pass
  • npm run lint: pass
  • npm ls eslint-plugin-react-hooks: one deduped 7.0.1 installation
  • pre-commit formatting, ESLint, docs sync, any-budget, and tracked-artifacts gates: pass
  • npm run test:all: unit matrix reached 34,427 tests; 34,395 passed, 6 failed, 7 cancelled, 19 skipped. The command stopped before Vitest/E2E. These failures are outside this manifest-only change; the focused regression remains green.

Follow-up

Upgrade to eslint-plugin-react-hooks 7.1.1 separately as an explicit lint-policy migration rather than accepting it through transitive dependency drift.

eslint-config-next permits eslint-plugin-react-hooks updates through ^7.0.0, so a reused or refreshed node_modules could load 7.1.1 and change React Compiler diagnostics without a source change. Pin the analyzed version directly and guard its package/lockfile alignment with a regression test.
@MumuTW
MumuTW requested a review from diegosouzapw as a code owner August 27, 2026 03:49
diegosouzapw added a commit that referenced this pull request Aug 28, 2026
Recreated from #11749 (MumuTW) onto the active release/v3.8.51 — commit cherry-picked with
author preserved; regression test + check:lockfile + check-file-size all green on this tip.
Thanks for the fix!
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks for this fix! Its base (release/v3.8.50) had gone stale relative to the active
release/v3.8.51, and this fork rejects maintainer pushes, so a direct rebase-and-merge wasn't
possible. Recreated your commit (author preserved via cherry-pick) onto the current tip and
merged it as #11886 — thank you for catching and fixing the eslint-plugin-react-hooks drift.

@MumuTW
MumuTW deleted the MumuTW/investigate-eslint-react-hooks branch September 5, 2026 10:18
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Recreated from cheaper-inference#11749 (MumuTW) onto the active release/v3.8.51 — commit cherry-picked with
author preserved; regression test + check:lockfile + check-file-size all green on this tip.
Thanks for the fix!
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