Skip to content

Frontend lint: enable react/exhaustive-deps explicitly and resolve the 32 suppressions #912

Open

Description

@smart-ssh-planner

Goal

Missing hook dependencies are reported by the linter, and every remaining suppression states why it is correct.

Context

  • apps/smart-ssh-community/frontend/.oxlintrc.json sets react/rules-of-hooks but not react/exhaustive-deps. Whether oxlint enables it by default could not be confirmed; if not, the 32 eslint-disable … react-hooks/exhaustive-deps comments do nothing and missing dependencies stay undetected.
  • Suppressions per file: components/FileBrowserPanel.tsx 7, components/ServerForm.tsx 4, useDialogFocusTrap.ts 2, components/TerminalView.tsx 2, components/SshConfigImportDialog.tsx 2, components/ServerList.tsx 2, components/NotesPanel.tsx 2, useVoiceInput.ts, useSessionTabs.ts, components/SshConfigExportDialog.tsx 1 each, and others (grep -rn "exhaustive-deps" src).
  • scripts/check-a11y-lint-rules.mjs already guards that the jsx-a11y rules stay error.

Requirements

  • Set "react/exhaustive-deps": "error" in .oxlintrc.json. Make sure the suppression comments use the rule name oxlint honours (eslint-disable-next-line react-hooks/exhaustive-deps vs react/exhaustive-deps); unify them.
  • Review every suppression: either fix the dependency list (with useCallback/refs where a dependency would re-run an effect wrongly) or keep the suppression with a one-line reason on the same comment (-- reason).
  • Extend scripts/check-a11y-lint-rules.mjs (or add a sibling check run by npm run lint) so react/exhaustive-deps and react/rules-of-hooks must stay error.
  • No behaviour change: effects that intentionally run once keep doing so (tests prove it).

Acceptance Criteria

  • oxlint --print-config (or equivalent) shows react/exhaustive-deps as error; npm run lint passes.
  • Every remaining suppression has a reason; the count before/after is in the PR.
  • The guard script fails if the rule is downgraded (test like a11yLintRulesCheck.test.ts).
  • npm test and the Playwright suite pass unchanged.

Technical Notes

  • Frontend only. FileBrowserPanel.tsx, ServerForm.tsx and ChatPanel.tsx are being decomposed in parallel work; keep changes in them minimal (dependency lists and comments only).

Spec impact: none

Related Work

  • –

Activity

  1. added this to the 0.8.0 milestone on Oct 26, 2026
  2. 2 remaining items

  3. marked this as blocked by 15 issues on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend (React/TypeScript)

    Type

    Fields

    Priority

    P3 - Low

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions