Fix frontend lint errors surfaced by new CI

↗ view on GitHub · Alex Maingot · 2026-05-14 · e7593aa7

The Re-platform commit introduced .github/workflows/ci.yml which runs
`npm run lint` for the first time on this codebase. That surfaced 38
pre-existing errors in code inherited from upstream willchen96/mike,
which never ran ESLint in CI.

Breakdown of fixes:

- 16 react-hooks/set-state-in-effect (new in eslint-plugin-react-hooks 7
  / Next 16): converted to the React "adjusting state during render"
  pattern, useSyncExternalStore for localStorage-backed state, or
  deferred initial measurements via requestAnimationFrame/setTimeout.
- 2 react-hooks/refs in ChatView: dropped a no-op .current entry from a
  dep array that was already covered by an eslint-disable comment.
- 1 react-hooks/immutability in DocView: hoisted scrollToHighlightOnPage
  above its first useCallback caller.
- 1 react-hooks/static-components in WFColumnViewModal: switched the
  dynamic icon to React.createElement so we don't bind a component to a
  PascalCase local during render.
- 11 @typescript-eslint/no-explicit-any: removed redundant casts
  (MikeMessage already typed files/error/workflow), typed the
  caret-from-point document shape, used unknown + narrowing in catch.
- 5 react/no-unescaped-entities: escaped apostrophes/quotes in JSX text.
- 2 @typescript-eslint/no-require-imports: ignored src/scripts/** in
  eslint config - the one file there is a CJS build-time conversion
  script, not part of the app bundle.

next build still succeeds. Zero behavior changes intended - the
React Compiler-aware rules were all addressed by restructuring effects
into pure-render derivations rather than disabling them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Repository amaingot/mike-aws
Author Alex Maingot <alex.maingot@gmail.com>
Authored
Parents 2dc27676
Stats 26 files changed , +409 , -248
Part of Frontend lint cleanups surfaced by new CI

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-e7593aa7.md from inside the repo you want the change in.

⬇ Download capture-commit-e7593aa7.md