Skip to content

Bug: eslint-plugin-react-hooks not throwing "Hooks may not be referenced as normal values" error #35283

@jsladerman

Description

@jsladerman

React version: 19.2.

Steps To Reproduce

  1. The expected behavior screenshot shows when my repo had eslint-plugin-react-compiler@beta and [email protected] installed. Per the React Compiler v1.0 announcement, I removed eslint-plugin-react-compiler, bumped eslint-plugin-react-hooks to the latest version (7.0.1), and made the eslint config changes accordingly. All other rules, including the new ones, seem to work as expected, except this one seems to have disappeared (I only noticed because our codebase has many instances of this that we've been planning to fix at some point before enabling the compiler). Is this a bug or is this no longer meant to throw a lint error, since it does explicitly break the rules of React ?

The current behavior

Image

The expected behavior

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions