Skip to content

Upgrade eslint-plugin-react-hooks to 7.1.x and fix new React Compiler diagnostics #8312

Description

@ironAiken2

Background

eslint-plugin-react-hooks is temporarily pinned to 7.0.1 because 7.1.1's React-Compiler-powered rules flag 19+ pre-existing violations across packages/backend.ai-ui and react (react-hooks/set-state-in-effect, react-hooks/refs, react-hooks/immutability, react-hooks/preserve-manual-memoization), which breaks CI lint.

Known offenders (from the 7.1.1 run): BAIFetchKeyButton, BAIGraphQLPropertyFilter, BAIModal, BAIProjectResourceGroupSelect, BAIRowWrapWithDividers, BAINameActionCell, BAITableSettingModal, BAIFileExplorer, plus multiple react/src components.

What to do

  • Fix the flagged patterns (mostly setState-in-effect → derive state during render / useEffectEvent / external-store subscription; refs-in-render; mutation of memoized values) per .claude/rules/use-effect-event.md.
  • Bump the catalog back to ^7.1.1 and regenerate the lockfile consistently (all importers on one version).
  • Confirm backend-ai-ui-vitest / react-vitest CI jobs pass.

JIRA Issue: FR-3338

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions