🌐
React
react.dev › blog › 2025 › 10 › 07 › react-compiler-1
React Compiler v1.0 – React
Compiler-powered lint rules ship in eslint-plugin-react-hooks’s recommended and recommended-latest preset.
🌐
React
react.dev › reference › eslint-plugin-react-hooks
eslint-plugin-react-hooks – React
The lints cover both fundamental React patterns (exhaustive-deps and rules-of-hooks) and issues flagged by React Compiler. React Compiler diagnostics are automatically surfaced by this ESLint plugin, and can be used even if your app hasn’t ...
Discussions

How do I use eslint-plugin-react-compiler with eslint 9?
Hello, I have never used eslint before and I would like to give eslint-plugin-react-compiler a shot. The ESlint docs do not mention an .eslintrc file like the React readme says. I'm quite confu... More on github.com
🌐 github.com
1
1
What eslint rules you recommend?
eslint-plugin-unicorn is always a great choice. What I like to do with core ESLint, or any plugin I use, is turn on every rule. I often find that this helps me find some rules that weren't turned on by default, that I probably wouldn't have found otherwise. From there, if I see a rule that I dislike, I either check to see if it can be configured in a way that I like, or I turn it off otherwise. More on reddit.com
🌐 r/reactjs
68
40
February 21, 2025
eslint-plugin-react-no-manual-memo: ESLint plugin for React Compiler users to flag any usage of useMemo, useCallback, and React.memo
Haha nice, that's a clever approach to adapting to React Compiler More on reddit.com
🌐 r/reactjs
2
24
October 5, 2025
React Compiler and exhaustive-deps
Your last paragraph is correct, it should be possible to rewrite your useEffect to do what you want without breaking the rule. Share some code if you can. Disabling the lint rule globally is a recipe for disaster as the compiler will assume the rule is enforced even though it isn’t, so everything downstream from that will possibly be corrupted. More on reddit.com
🌐 r/reactjs
2
7
June 4, 2024
🌐
npm
npmjs.com › package › eslint-plugin-react-hooks
eslint-plugin-react-hooks - npm
import reactHooks from 'eslint-plugin-react-hooks'; export default [ { files: ['**/*.{js,jsx}'], plugins: { 'react-hooks': reactHooks }, // ... 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', } }, ];
      » npm install eslint-plugin-react-hooks
    
Published   Oct 24, 2025
Version   7.0.1
Homepage   https://react.dev/
🌐
GitHub
github.com › jsx-eslint › eslint-plugin-react
GitHub - jsx-eslint/eslint-plugin-react: React-specific linting rules for ESLint · GitHub
If you are using the new JSX transform from React 17, extend react/jsx-runtime in your eslint config (add "plugin:react/jsx-runtime" to "extends") to disable the relevant rules.
Starred by 9.3K users
Forked by 2.7K users
Languages   JavaScript
🌐
GitHub
github.com › reactwg › react-compiler › discussions › 25
How do I use eslint-plugin-react-compiler with eslint 9? · reactwg/react-compiler · Discussion #25
import reactCompilerPlugin from 'eslint-plugin-react-compiler'; export default [ { plugins: { "react-compiler": reactCompilerPlugin }, rules: { "react-compiler/react-compiler": "error", }, files: ["**/*.res.mjs"] }];
Author   reactwg
🌐
npm
npmjs.com › package › eslint-plugin-react-compiler
eslint-plugin-react-compiler - npm
{ "rules": { "react-compiler/react-compiler": "error" } } TODO: Run eslint-doc-generator to generate the rules list.
      » npm install eslint-plugin-react-compiler
    
Published   May 14, 2025
Version   19.1.0-rc.2
🌐
npm
npmjs.com › package › eslint-plugin-react
eslint-plugin-react - npm
April 3, 2025 - React specific linting rules for ESLint. Latest version: 7.37.5, last published: a year ago. Start using eslint-plugin-react in your project by running `npm i eslint-plugin-react`. There are 16980 other projects in the npm registry using eslint-plugin-react.
      » npm install eslint-plugin-react
    
Published   Apr 03, 2025
Version   7.37.5
Author   Yannick Croissant
🌐
Expo Documentation
docs.expo.dev › development process › reference › react compiler
React Compiler - Expo Documentation
November 3, 2025 - Check how compatible your project is with the React Compiler. ... This will generally verify if your app is following the rules of React. ... Babel is automatically configured in Expo SDK 54 and later. ... In the future, all of the following steps below will be automated by Expo CLI. Additionally, you should use the ESLint plugin to continuously enforce the rules of React in your project.
Find elsewhere
🌐
GitHub
github.com › facebook › react › blob › main › compiler › packages › eslint-plugin-react-compiler › src › rules › ReactCompilerRule.ts
react/compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts at main · facebook/react
import {Logger} from 'babel-plugin-react-compiler/src/Entrypoint'; import type {Rule} from 'eslint'; import {Statement} from 'estree'; import * as HermesParser from 'hermes-parser'; · type CompilerErrorDetailWithLoc = Omit<CompilerErrorDetailOptions, 'loc'> & { loc: BabelSourceLocation; }; ·
Author   facebook
🌐
GitHub
github.com › reactwg › react-compiler › discussions › 18
Using `eslint-plugin-react-hooks` together with `eslint-plugin-react-compiler` · reactwg/react-compiler · Discussion #18
Compilation failed: useCustomHook.tsx React Compiler has skipped optimizing this component because one or more React ESLint rules were disabled React Compiler only works when your components follow all the rules of React, disabling them may ...
Author   reactwg
🌐
Reddit
reddit.com › r/reactjs › what eslint rules you recommend?
r/reactjs on Reddit: What eslint rules you recommend?
February 21, 2025 -

Hey all, I am in the process of creating my own eslint version 9 set of rules with a flat config for the first time and I am wondering what you guys are using or recommending as a must have?

I use Typescript with React so thought to definitely include eslint-plugin-react and typescript-eslint. What else? I saw there is sonar eslint too but this one seems not so popular?

Do you have any "gems" that are not enabled by default or not popular but still a great addition?

I also see that many rules can be customized a bit, do you recommend that or rather not?

Really curious and interested about your experience on this, thanks!

🌐
Reddit
reddit.com › r/reactjs › eslint-plugin-react-no-manual-memo: eslint plugin for react compiler users to flag any usage of usememo, usecallback, and react.memo
r/reactjs on Reddit: eslint-plugin-react-no-manual-memo: ESLint plugin for React Compiler users to flag any usage of useMemo, useCallback, and React.memo
October 5, 2025 -

As someone who learned React in 2022, I write memoization hooks basically by instinct at this point, and I needed something to tell me to stop doing that now that React Compiler is here and tells us to not do that any more.

So, I wrote a little ESLint plugin to catch when I write useMemo, useCallback, or React.memo, and I figured I'd share it with everyone else too. Enjoy!

p.s. I made sure to include React Compiler Playground links in the docs so you can see React Compiler's memoization in action—not just blindly trust that the rules are right!

🌐
Reddit
reddit.com › r/reactjs › react compiler and exhaustive-deps
r/reactjs on Reddit: React Compiler and exhaustive-deps
June 4, 2024 -

Hey, guys! I’ve been testing the React Compiler Eslint plugin to see if my codebase could benefit from any changes ahead of React 19 stable. One problem that I’ve run into is that disabling exhaustive-deps inline throws an eslint error because I’m disabling a react eslint rule, implying that the component will be skipped for compiler optimization. However, if I disable the rule globally in my eslintrc, no error is thrown. This might just be a limitation of the linter.

My question is, if I disable this rule globally, will react compiler still refuse to optimize the components that don’t follow the rules of exhaustive-deps? Exhaustive-deps is a rule that I don’t think has historically been the best option, because there are cases when you want to only run a useEffect on mount, and not if the states inside them change. Or, sometimes you only want useEffect to run when some states change, but not when others change.

It could also be the case that I just don’t understand how to write good useEffects after 5 years of using them, so I’m open to feedback about other ways of achieving the goals outlined above in an elegant way.

🌐
Medium
medium.com › @onix_react › introducing-react-compiler-1-0-3a15141ac6ae
Introducing React Compiler 1.0. The React team is thrilled to announce… | by Onix React | Medium
October 16, 2025 - This means developers no longer need to manually wrap values with useMemo, functions with useCallback, or components with React.memo. Instead, you can write idiomatic declarative code, and the compiler handles the performance heavy lifting, resulting in fewer re-renders and more responsive UIs. This release also features the integration of compiler-derived linting rules into the recommended presets of eslint-plugin-react-hooks.
🌐
LogRocket
blog.logrocket.com › home › react compiler rc: what it means for react devs
React Compiler RC: What it means for React devs - LogRocket Blog
May 2, 2025 - N.B. To enable the rule, add 'react-hooks/react-compiler': 'error' to your ESLint config, as shown in the example above. In the beta version, the compiler was only compatible with React 19, and the fastest way to use it was within a Next.js project.
🌐
Eslint-react
eslint-react.xyz
ESLint React
4-7x faster composable ESLint rules for React and friends.
Top answer
1 of 4
10

When I tried the config snippet in the question by @Jonathan Kasser, I got an error: TypeError: context.getSource is not a function.

The solution is to use fixupPluginRules from @eslint/compat (you need to install this), so my eslint.config.js has a separate object in the config array:

import { fixupPluginRules } from "@eslint/compat";

  // Even though eslint-plugin-react-hooks exposes configs.recommended, it is not yet compatible with the flat file config, 
  // because it has plugins: [ 'react-hooks' ] property, but plugins should be an object
  // Once it is supported, replace with: eslintPluginReactHooks.configs.recommended,
  {
    plugins: {
      "react": reactPlugin, // remove this if you already have another config object that adds the react plugin
      "react-hooks": fixupPluginRules(eslintPluginReactHooks),
    },
    rules: {
      ...eslintPluginReactHooks.configs.recommended.rules,
    },
  },

Resources

  • https://github.com/t3-oss/create-t3-turbo/issues/984#issuecomment-2210934687

Proof it works

I've confirmed this by having a code that should error, and saw the error:

  const [first, setfirst] = useState("");
  useEffect(() => {
    console.log(first);
  }, []);
8:6  warning  React Hook useEffect has a missing dependency: 'first'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
2 of 4
4

[email protected] was released a few weeks ago with "stable" eslint v9 support. If you can upgrade, then see https://github.com/facebook/react/issues/28313#issuecomment-2408157792 for a sample configuration for now.

Also, follow this thread if interested in documentation refresh

🌐
React
react.dev › learn › react-compiler › installation
Installation – React
When the ESLint rule reports an error, it means the compiler will skip optimizing that specific component or hook. This is safe: the compiler will continue optimizing other parts of your codebase. You don’t need to fix all violations immediately. Address them at your own pace to gradually increase the number of optimized components. ... If you haven’t already configured eslint-plugin-react-hooks, follow the installation instructions in the readme.