Skip to content

Upgrading eslint-plugin-react-hooks #3186

Open

Description

@weihongyu12

A new version of eslint-plugin-react-hooks has been released, which adds support for React Compiler related rules. I recommend releasing a version that supports the new version of eslint-plugin-react-hooks before supporting V9.

New eslint-plugin-react-hooks configuration

{
  "plugins": [
    // ...
    "react-hooks"
  ],
  "rules": {
    // ...
    // Core hooks rules
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "warn",

    // React Compiler rules
    "react-hooks/config": "error",
    "react-hooks/error-boundaries": "error",
    "react-hooks/component-hook-factories": "error",
    "react-hooks/gating": "error",
    "react-hooks/globals": "error",
    "react-hooks/immutability": "error",
    "react-hooks/preserve-manual-memoization": "error",
    "react-hooks/purity": "error",
    "react-hooks/refs": "error",
    "react-hooks/set-state-in-effect": "error",
    "react-hooks/set-state-in-render": "error",
    "react-hooks/static-components": "error",
    "react-hooks/unsupported-syntax": "warn",
    "react-hooks/use-memo": "error",
    "react-hooks/incompatible-library": "warn"
  }
}

Activity

  1. ayesigaisaac commented on Oct 20, 2025

    @ayesigaisaac
  2. Ankitkumarthakur0 commented on Dec 13, 2025

    @Ankitkumarthakur0

    Thanks for raising this.

    Before attempting any upgrade, it might be helpful to clarify whether the current 'eslint-plugin-react-hooks' version is intentionally pinned for stability, or if an update is planned once compatibility with newer React / compiler-related rules is evaluated.

    If an upgrade is on the roadmap, it could also be useful to document which of the newer rules are expected to be enforced by the Airbnb config and which ones are intentionally excluded.

  3. prinalpatil730 commented on Jan 2, 2026

    @prinalpatil730
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions