Skip to content

chore(lint): promote all 7 React strict hooks rules to error and gate warnings#52

Merged
juacker merged 1 commit into
mainfrom
chore/promote-react-hooks-rules-to-error
Jun 12, 2026
Merged

chore(lint): promote all 7 React strict hooks rules to error and gate warnings#52
juacker merged 1 commit into
mainfrom
chore/promote-react-hooks-rules-to-error

Conversation

@juacker

@juacker juacker commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Final step of #5: the codebase reached zero violations across all 7 React 19 strict hooks rules after the cleanup sub-PR series (latest: #46), so this PR locks the gate:

  • warnerror for all 7 react-hooks/* rules, in both the TS and JS config blocks.
  • --max-warnings 0 added to npm run lint (which CI runs), so the remaining warn-level rules (no-unused-vars variants) can't silently accumulate either. The tree is currently at 0 warnings, so CI stays green.
  • The ~230 lines of per-rule violation inventories in the config header documented cleanup work that is now finished; replaced with a concise history note pointing back at [QA] Re-enable React strict hooks rules incrementally #5. Config shrinks 339 → 108 lines.

The 33 deliberate exceptions across src/ stay as inline eslint-disable-next-line directives with their own justifications — unchanged by this PR.

Verification

  • npm run lint exits 0 on the clean tree (with the new flags).
  • Planted a probe file with a set-state-in-effect violation: lint reports it as error and exits 1; removed the probe, lint clean again.
  • No docs reference the warn-level status.

Closes #5

The codebase reached zero react-hooks violations after the clai#5
cleanup series (sub-PRs through #46), so the rules graduate from
advisory warnings to hard errors in both the TS and JS config blocks.
The 33 deliberate exceptions remain as justified inline
eslint-disable-next-line directives.

Also gates the lint script with --max-warnings 0 so the remaining
warn-level rules (unused-vars) cannot silently accumulate — the tree
is currently at zero warnings, so CI stays green.

The ~230 lines of per-rule violation inventories in the config header
documented work that is now finished; replaced with a concise history
note pointing at clai#5.

Verified: npm run lint exits 0 on the clean tree; a probe file with a
set-state-in-effect violation fails lint with exit 1 (reported as
error).

Closes #5
@juacker juacker marked this pull request as ready for review June 12, 2026 14:04
@juacker juacker merged commit 3f8c18e into main Jun 12, 2026
1 check passed
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.

[QA] Re-enable React strict hooks rules incrementally

1 participant