Skip to content

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

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
fix/11749-recreate-eslint-hooks-pin
Aug 28, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
fix/11749-recreate-eslint-hooks-pin

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Summary

Recreation of #11749 (MumuTW) onto the active release/v3.8.51 — the original PR was opened
against the stale release/v3.8.50, and MumuTW's fork rejects maintainer pushes, so a direct
rebase-and-push wasn't possible. Cherry-picked the PR's single commit (author preserved) onto
the current tip and re-validated here.

  • 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 (on release/v3.8.51 tip)

  • focused regression test: node --import tsx/esm --test tests/unit/eslint-react-hooks-version-pinned.test.ts — pass
  • npm run check:lockfile: pass
  • node scripts/check/check-file-size.mjs: pass
  • package.json/package-lock.json JSON validity: pass

Closes #11749 (recreated — commit author MumuTW preserved via cherry-pick).

Co-authored-by: MumuTW 42820974+MumuTW@users.noreply.github.com

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.
@diegosouzapw
diegosouzapw merged commit 0188685 into release/v3.8.51 Aug 28, 2026
7 of 12 checks passed
@diegosouzapw
diegosouzapw deleted the fix/11749-recreate-eslint-hooks-pin branch August 28, 2026 12:41
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