Skip to content

deps(frontend): eslint 10 + react-hooks 7 as one set (lands #413/#414) - #427

Merged
WalksWithASwagger merged 2 commits into
mainfrom
codex/deps-eslint10-reacthooks7
Aug 2, 2026
Merged

deps(frontend): eslint 10 + react-hooks 7 as one set (lands #413/#414)#427
WalksWithASwagger merged 2 commits into
mainfrom
codex/deps-eslint10-reacthooks7

Conversation

@WalksWithASwagger

Copy link
Copy Markdown
Owner

What

Lands the coupled frontend ESLint major bump as one reviewed set (tracks #425):

These are mutually dependent (react-hooks 7.x is the line aligned with eslint 10) and must land together or not at all — bumping either alone breaks npm run lint.

Why one PR

Dependabot opened #413 and #414 separately; each fails the CI test gate on its own. Combining them is the only way the lint step (part of npm run verify) passes.

Changes

  • frontend/package.json: bump the two devDeps above. No other dependency changes (@eslint/js stays at ^9.32.0 — its recommended config is compatible with eslint 10; lint runs clean with no missing-rule errors).
  • frontend/package-lock.json: refreshed for the new resolutions.
  • frontend/eslint.config.js: react-hooks 7 promotes the React-Compiler rule react-hooks/set-state-in-effect to error in its recommended set (react-hooks 5 did not enforce it). This SSR app (TanStack Start) intentionally initializes state from browser-only APIs and external stores inside mount effects (e.g. use-mobile reading window, generate reading a localStorage-backed history store, spend fetching on mount), which the heuristic flags. The single new rule is downgraded to warn — a targeted severity change, not a blanket disable, and not an eslint-disable sprinkle. All prior errors stay errors; rules-of-hooks and exhaustive-deps behavior is unchanged.

No source/runtime code changes — this is intentionally behavior-neutral so the tooling major carries zero regression risk. Adopting set-state-in-effect as an error (and refactoring the flagged effects) is a separate follow-up.

Verification

  • frontend: npm run verify (typecheck + test + build + lint) passes locally (Node 26). Lint: 0 errors, 51 warnings (45 pre-existing react-refresh/only-export-components + 6 now-warning set-state-in-effect). Warnings do not fail eslint . (no --max-warnings).
  • CI (Node 22.13) is the gate — see checks below.

Notes

Land the coupled frontend ESLint major bump as a single set: eslint
9.39.5 -> 10.8.0 (supersedes #413) and eslint-plugin-react-hooks
5.2.0 -> 7.1.1 (supersedes #414). They are mutually dependent and must
land together.

react-hooks 7 promotes the React-Compiler rule set-state-in-effect to
an error in its recommended config. This SSR app (TanStack Start)
intentionally initializes state from browser-only APIs and external
stores inside mount effects, which the heuristic flags. Downgrade only
that single new rule to a warning so the tooling upgrade stays
behavior-neutral; adopting it as an error is a separate follow-up. No
source/runtime code changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017F63bPvWRFR4iVEm83Pzoj
@WalksWithASwagger
WalksWithASwagger merged commit eac51ac into main Aug 2, 2026
8 checks passed
@WalksWithASwagger
WalksWithASwagger deleted the codex/deps-eslint10-reacthooks7 branch August 2, 2026 18:10
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.

1 participant