Skip to content

fix: I address the 18 react-hooks lint warnings from the ESLint 9 upgrade - #191

Merged
zaccesss merged 1 commit into
mainfrom
fix/react-hooks-lint-warnings
Aug 5, 2026
Merged

fix: I address the 18 react-hooks lint warnings from the ESLint 9 upgrade#191
zaccesss merged 1 commit into
mainfrom
fix/react-hooks-lint-warnings

Conversation

@zaccesss

@zaccesss zaccesss commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Closes #190

One (app/faq/page.tsx) was a genuine issue, a running index counter mutated during render, replaced with a precomputed per-section offset. The other 17 are legitimate, documented patterns that this new rule set cannot distinguish from unsafe code, each annotated with a scoped, justified eslint-disable rather than rewritten:

  • 14 cases of syncing React state from an external source on mount or dependency change (localStorage, DOM classList, a fetch), which is the pattern react.dev itself documents for effects
  • 1 intentional ref read in TelemetryChart.tsx that batches WebSocket pushes between polls rather than re-rendering on every message
  • 2 warnings on the same recursive-reconnect closure in useWebSocketTelemetry.ts, a standard self-referencing setTimeout pattern that is safe because the closure only runs after the function's own declaration has completed

Removed the file-wide warn-level downgrade from eslint.config.mjs now that every flagged line has a precise justification instead.

…rade

Closes #190

One (app/faq/page.tsx) was a genuine issue, a running index counter
mutated during render, replaced with a precomputed per-section offset.
The other 17 are legitimate, documented patterns that this new rule
set cannot distinguish from unsafe code, each is annotated with a
scoped, justified eslint-disable rather than rewritten:

- 14 cases of syncing React state from an external source on mount
  or dependency change (localStorage, DOM classList, a fetch), which
  is the pattern react.dev itself documents for effects
- 1 intentional ref read in TelemetryChart.tsx that batches WebSocket
  pushes between polls rather than re-rendering on every message
- 2 warnings on the same recursive-reconnect closure in
  useWebSocketTelemetry.ts, a standard self-referencing setTimeout
  pattern that is safe because the closure only runs after the
  function's own declaration has completed

Removed the file-wide warn-level downgrade from eslint.config.mjs now
that every flagged line has a precise justification instead.

@zaccesss zaccesss left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the faq/page.tsx rewrite against the original output (same numbering, now a pure computation), and spot-checked several of the eslint-disable justifications against the actual code, they hold up. Good to merge.

@zaccesss
zaccesss merged commit 50c8a92 into main Aug 5, 2026
4 checks passed
@zaccesss
zaccesss deleted the fix/react-hooks-lint-warnings branch August 5, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Address the new stricter react-hooks lint rules downgraded during the ESLint 9 migration

1 participant