chore(lint): promote all 7 React strict hooks rules to error and gate warnings#52
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
warn→errorfor all 7react-hooks/*rules, in both the TS and JS config blocks.--max-warnings 0added tonpm run lint(which CI runs), so the remaining warn-level rules (no-unused-varsvariants) can't silently accumulate either. The tree is currently at 0 warnings, so CI stays green.The 33 deliberate exceptions across
src/stay as inlineeslint-disable-next-linedirectives with their own justifications — unchanged by this PR.Verification
npm run lintexits 0 on the clean tree (with the new flags).set-state-in-effectviolation: lint reports it as error and exits 1; removed the probe, lint clean again.Closes #5