Skip to content

Fix 7 pre-existing ESLint errors from stricter react-hooks rules #23

Description

@dihass

`npm run lint` currently reports 7 errors / 2 warnings from `eslint-plugin-react-hooks`'s newer `react-hooks/set-state-in-effect` and `react-hooks/refs` rules. The app builds and runs correctly — these are lint-only findings, not runtime bugs — but worth addressing since some flag genuinely fragile patterns.

Locations:

  • `src/App.tsx:91` — setState in effect (restore-in-progress overlay)
  • `src/components/docs/DocsPage.tsx:256` — setState in effect (doc content reset)
  • `src/components/game/GameTable.tsx:112` — setState in effect (frozen trick reset)
  • `src/components/game/GameTable.tsx:249` — setState in effect (slow-player timer)
  • `src/components/lobby/WaitingRoom.tsx:41` — ref accessed during render
  • `src/hooks/useSignalR.ts:29` — ref mutated during render (latest-ref pattern)
  • `src/hooks/useSignalR.ts:38` — setState in effect (connection state reset)

CI now runs `npm run lint` non-blocking (`continue-on-error: true`) so these are visible without failing builds. Once fixed, remove `continue-on-error` from the Frontend Build job in `.github/workflows/ci.yml`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions