Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Bug: `eslint-plugin-react-hooks` hides all errors on multiple findings | GoodFirstPicks

Bug: `eslint-plugin-react-hooks` hides all errors on multiple findings

facebook/react 9 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeReactJavaScriptTypeScript

Why this is a good first issue

The issue involves debugging ESLint plugin behavior with React Hooks rules.

AI Summary

The issue describes a bug where `eslint-plugin-react-hooks` fails to report multiple errors correctly, particularly when uncommenting certain lines of code. The problem appears to be related to `babel-plugin-react-compiler`'s AST processing. While the issue is somewhat reproducible, it requires deeper investigation into the interaction between ESLint and Babel plugins.

Issue Description

What kind of issue is this?

  • React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
  • babel-plugin-react-compiler (build issue installing or using the Babel plugin)
  • eslint-plugin-react-hooks (build issue installing or using the eslint plugin)
  • react-compiler-healthcheck (build issue installing or using the healthcheck script)

React version: 19.2.0

Steps To Reproduce

  1. Add eslint-plugin-react-hooks to your project
  2. Open a tsx file
  3. Intentionally add a violation of the react-hooks/set-state-in-effect rule
  4. In the same file, intentionally add a violation of react-hooks/static-components rule
  5. Uncomment 1 of the 2 commented lines of code below

Link to code example:

export default function App() {
  const [foo, setFoo] = useState(false);

  useEffect(() => {
    setFoo(!foo);
  }, []);

  const ViolateStaticComponents = () => {
    // const [counter, setCounter] = useState(0);
    return (
      <h1>Hello, World!</h1>
    );
  };

  // const date = Intl.DateTimeFormat().format(new Date());

  return (
    <>
      <ViolateStaticComponents />
      ...
    </>
  );
}

GitHub Labels

Status: Unconfirmed

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • requires understanding of babel-plugin-react-compiler
  • potential interaction with ESLint internals
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedunclear