Here is my ESLint plugins I use for all my NextJS projects: https://github.com/ixartz/Next-js-Boilerplate/blob/main/package.json#L85-L102 There are 18 plugins. I also use ESLint plugins for testing part: Jest, Playwright, Storybook, etc. And here you can find how I configure everything: https://github.com/ixartz/Next-js-Boilerplate/blob/main/.eslintrc Answer from ixartz on reddit.com
🌐
npm
npmjs.com › package › eslint-plugin-react
eslint-plugin-react - npm
March 4, 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
🌐
GitHub
github.com › jsx-eslint › eslint-plugin-react
GitHub - jsx-eslint/eslint-plugin-react: React-specific linting rules for ESLint · GitHub
React-specific linting rules for ESLint. Contribute to jsx-eslint/eslint-plugin-react development by creating an account on GitHub.
Starred by 9.3K users
Forked by 2.7K users
Languages   JavaScript
Discussions

How to use eslint-plugin-react and eslint-plugin-react-hooks, just for myself?
You don't normally, because its better for the code to be consistent among developers. I would advice that you, instead aim to convince your team to install it for the project. If you still want to do it, you could install it, develop and then remove it from your package.json before commiting. And maybe create a simple script file (AI could do this for you) to do this for you. More on reddit.com
🌐 r/reactjs
7
6
January 10, 2025
reactjs - Integration of eslint-plugin-react-hooks/recommended with eslint.config.js - Stack Overflow
I struggle a lot to configure eslint-plugin-react-hooks/recommended using eslint's new configuration file (eslint.config.js). Using the previous eslint configuration (.eslintrc.js) would have resul... More on stackoverflow.com
🌐 stackoverflow.com
New to React and eslint is the hardest part
Lint rules should help you, not hurt you: https://twitter.com/dan_abramov/status/1086215004808978434 Open your ESLint config Disable all styling rules (or add eslint-config-prettier which does that) Install Prettier You’ll thank me. Linters are there to help you find mistakes in your code. Not to torture you. If your linter tortures you, it’s not your fault (but might be your team lead’s). Look at every linting rule and think: “Does this rule bring me joy help me find bugs?” If not, TURN IT OFF. Note that the eslint-config-react-app that comes with Create-React-App by default only warns about things that may cause possible bugs, like using variables before they're defined or breaking the React rules of hooks. I would suggest not using the Airbnb config, because it's far too over-opinionated and many of the things that it warns about are perfectly valid things to do in React (like creating arrow functions while rendering and passing them as props). More on reddit.com
🌐 r/reactjs
24
3
February 24, 2021
What ESLint Plugins Do You Recommend When Using NextJs?
Here is my ESLint plugins I use for all my NextJS projects: https://github.com/ixartz/Next-js-Boilerplate/blob/main/package.json#L85-L102 There are 18 plugins. I also use ESLint plugins for testing part: Jest, Playwright, Storybook, etc. And here you can find how I configure everything: https://github.com/ixartz/Next-js-Boilerplate/blob/main/.eslintrc More on reddit.com
🌐 r/reactjs
25
14
February 20, 2024
🌐
npm
npmjs.com › package › @eslint-react › eslint-plugin
@eslint-react/eslint-plugin - npm
February 14, 2026 - A unified plugin that combines all individual plugins from the eslint-react monorepo into one.. Latest version: 2.13.0, last published: 24 days ago. Start using @eslint-react/eslint-plugin in your project by running `npm i @eslint-react/esl...
      » npm install @eslint-react/eslint-plugin
    
Published   Feb 14, 2026
Version   2.13.0
Author   Rel1cx
🌐
React
react.dev › reference › eslint-plugin-react-hooks
eslint-plugin-react-hooks – React
This plugin helps you catch violations of React’s rules at build time, ensuring your components and hooks follow React’s rules for correctness and performance. 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 adopted the compiler yet.
🌐
npm
npmjs.com › package › eslint-plugin-react-hooks
eslint-plugin-react-hooks - npm
The official ESLint plugin for React which enforces the Rules of React and other best practices.
      » npm install eslint-plugin-react-hooks
    
Published   Oct 24, 2025
Version   7.0.1
Homepage   https://react.dev/
🌐
Medium
medium.com › @RossWhitehouse › setting-up-eslint-in-react-c20015ef35f7
Setting up ESLint in React
April 13, 2018 - In our terminal again, we need to npm install -g eslint-plugin-react. Alternatively if you're running ESLint locally, we run npm install eslint-plugin-react --save-dev. This will install the plugin we need, but we need to tell ESLint that we want this plugin to help us out.
Find elsewhere
🌐
freeCodeCamp
freecodecamp.org › news › how-to-add-eslint-to-your-react-project
How to Add ESLint to Your React Project
August 8, 2023 - npx create-react-app signup-app · And you can use the following command to set up ESLint: npm install eslint eslint-plugin-react eslint-plugin-react-hooks --save-dev ·
🌐
Reddit
reddit.com › r/reactjs › how to use eslint-plugin-react and eslint-plugin-react-hooks, just for myself?
r/reactjs on Reddit: How to use eslint-plugin-react and eslint-plugin-react-hooks, just for myself?
January 10, 2025 -

Forgive me if this question is poorly worded or misinformed; I'm new to using NPM.

My team has eslint installed as a dev dependency in our project to ensure high code quality. However, we don't use the eslint-plugin-react or eslint-plugin-react-hooks packages. I'd like to install them so that I can follow the best React practices when coding, without actually making changes to the official dependencies used by all developers. Is there a way to go about this (eg, modify a personal "packages.json" that is separate from the project's but will still lint my company's project)?

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

🌐
LogRocket
blog.logrocket.com › home › 12 essential eslint rules for react
12 essential ESLint rules for React - LogRocket Blog
June 4, 2024 - All versions of react-scripts (one of CRA’s packages) from v3 and later utilize an inbuilt Create React App ESLint configuration which is already set up to include the eslint-plugin-react-hooks plugin (as well as the handy jsx-a11y plugin).
🌐
GitHub
github.com › yannickcr › eslint-plugin-react › blob › master › README.md
eslint-plugin-react/README.md at master · jsx-eslint/eslint-plugin-react
React-specific linting rules for ESLint. Contribute to jsx-eslint/eslint-plugin-react development by creating an account on GitHub.
Author   jsx-eslint
🌐
GitHub
microsoft.github.io › rnx-kit › docs › tools › eslint-plugin
eslint-plugin | React Native Developer Tools
plugin:@typescript-eslint/recommended · plugin:react-hooks/recommended · plugin:react/recommended · It also includes and enables the following rules: @react-native/platform-colors · @rnx-kit/eslint-plugin/strict extends @rnx-kit/eslint-plugin/recommended with rules that enables better tree shaking: @rnx-kit/no-const-enum ·
🌐
GitHub
github.com › Rel1cx › eslint-react
GitHub - Rel1cx/eslint-react: 4-7x faster, composable ESLint rules for React and friends.
eslint-plugin-react-rsc - Rules for React Server Components.
Starred by 490 users
Forked by 39 users
Languages   TypeScript 80.1% | MDX 19.3% | TypeScript 80.1% | MDX 19.3%
🌐
Eslint-react
eslint-react.xyz
ESLint React
4-7x faster, composable ESLint rules for React and friends.
🌐
Scaler
scaler.com › home › topics › react › eslint plugin react
ESLint Plugin React - Scaler Topics
May 4, 2023 - ESlint is an open-source library that Reacts developers frequently use to enforce guidelines for upholding the project's code standard. You can configure the desired rules on your own because it is completely customizable.
🌐
Codebrahma
codebrahma.com › eslint-setup-for-react-projects-step-by-step
ESLint Setup for React Projects: Step-by-Step
November 5, 2024 - This sets up ESLint with recommended rules for JavaScript and React, including hooks. We've already installed the React plugins.