🌐
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
🌐
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/
Discussions

How is ESLint integrated into Create React App?
When I run npx create-react-app some-name, a bare-bones React project is created for me. When I then peek into package.json, there seems to be some evidence of ESLint being present, as there is thi... More on stackoverflow.com
🌐 stackoverflow.com
What's the best eslint.config.mjs for a react + typescript project with eslint/prettier/husky?
ESLint's website tells you exactly how to do this. Also, be aware that they extracted out the stylistic rules into a separate plugin (maintained by an external entity) to focus more on the logical ones. More on reddit.com
🌐 r/reactjs
9
13
April 29, 2024
Is eslint-plugin-react is unnecessary if i use @typescript-eslint/eslint-plugin and eslint-plugin-react-hooks?
I believe it still does, but go look at the docs to know for sure. More on reddit.com
🌐 r/reactjs
7
3
November 30, 2023
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
JavaScript code analysis software
ESLint is a static code analysis tool for identifying problematic patterns found in JavaScript code. It was created by Nicholas C. Zakas in 2013. Rules in ESLint are configurable, and customized rules … Wikipedia
Factsheet
Original author Nicholas C. Zakas
Developer Nicholas C. Zakas
Initial release June 30, 2013; 12 years ago (2013-06-30)
Factsheet
Original author Nicholas C. Zakas
Developer Nicholas C. Zakas
Initial release June 30, 2013; 12 years ago (2013-06-30)
🌐
ESLint
eslint.org
Find and fix problems in your JavaScript code - ESLint - Pluggable JavaScript Linter
ESLint is an open source project that helps you find and fix problems with your JavaScript code.
🌐
DEV Community
dev.to › timwjames › the-best-eslint-rules-for-react-projects-30i8
The Best ESLint Rules for React Projects - DEV Community
September 16, 2023 - You can find my complete ESLint config on NPM: @tim-w-james/eslint-config · An obvious pick for React projects, but eslint-plugin-react along with their plugin:react/recommended rule set is a must. This will give you some sensible rules such as requiring a key to be specified in JSX arrays.
🌐
Eslint-react
eslint-react.xyz
ESLint React
4-7x faster, composable ESLint rules for React and friends.
Find elsewhere
🌐
Medium
medium.com › @RossWhitehouse › setting-up-eslint-in-react-c20015ef35f7
Setting up ESLint in React
April 13, 2018 - Setting up ESLint in React I love ESLint. It’s a pluggable linter that’s going to tell you if you’ve imported something and not used it, if your function could be short-handed, and loads of …
Top answer
1 of 4
91

Yes, create-react-app comes with eslint config.

How do I enable and extend it correctly?

You can check how to extend it here.

{
  "eslintConfig": {
    "extends": ["react-app", "shared-config"],
    "rules": {
      "additional-rule": "warn"
    },
    "overrides": [
      {
        "files": ["**/*.ts?(x)"],
        "rules": {
          "additional-typescript-only-rule": "warn"
        }
      }
    ]
  }
}

How do I enable it?

You need to integrate it with your IDE.

How do I run it?

After integrating it, an eslint server will be running in the background and will enable linting for your IDE (sometimes restarting IDE required).


I checked all your claims after running npx create-react-app example:

...one cannot run the eslint command in the project root.

You can:

eslint is installed as part of the project dependency, just by running eslint globally (eslint [cmd]) you need to ensure it installed globally (not recommended).

...ESLint does not seem to be a dependency within package.json.

Why should it be? That's why you using a starter like CRA. It's an inner dependency, you don't need to worry about it, that's CRA's job.

...VS Code doesn't pick up that there is ESLint present.

It does, check the OUTPUT tab and look for ESLint to see the server's output.

...there is no .eslintrc.* file in the project root.

You get the default configuration from CRA (which is hidden from you for focusing on coding). Add such file if you want to override it (you can also extend it, check the docs).


It's very useful to understand what eslint actually is and how we use it React development, check out related question "Do React hooks really have to start with “use”?".

2 of 4
48

To expand on the top comment's answer:

...ESLint does not seem to be a dependency within package.json.

Why should it be? That's why you using a starter like CRA. It's an inner dependency, you don't need to worry about it, that's CRA's job.

A project created with create-react-app will have react-scripts as a dependency.

react-scripts has eslint installed as a dependency, as seen in react-scripts package.json.

You can see if a package is installed (and where) by running npm ls <package> in your project root.

npm ls eslint shows:

└─┬ [email protected]
  └── [email protected] 

This shows the dependency tree that we manually investigated by looking in GitHub at react-scripts.

So - a project made with create-react-app does come with eslint. As it is a dependency, not something globally installed, then it must be ran with a npm script.

This is why running eslint . in your terminal does not work, but using

    "lint": "eslint .",

then npm run lint does. (though you may with to make the command eslint --ignore-path .gitignore . due to a current bug).

Similarly, the eslint configs are installed in react-scripts, then referenced in the default project output's own package.json.

🌐
GitHub
github.com › Rel1cx › eslint-react
GitHub - Rel1cx/eslint-react: 4-7x faster, composable ESLint rules for React and friends.
4-7x faster, composable ESLint rules for React and friends. - Rel1cx/eslint-react
Starred by 490 users
Forked by 39 users
Languages   TypeScript 80.1% | MDX 19.3% | TypeScript 80.1% | MDX 19.3%
🌐
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 adopted the compiler yet.
🌐
npm
npmjs.com › package › eslint
eslint - npm
1 week ago - We recommend using eslint-plugin-react if you are using React and want React semantics.
      » npm install eslint
    
Published   Mar 06, 2026
Version   10.0.3
Author   Nicholas C. Zakas
Homepage   https://eslint.org
🌐
ESLint
eslint.org › docs › latest › use › getting-started
Getting Started with ESLint
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs.
🌐
Reddit
reddit.com › r/reactjs › what's the best eslint.config.mjs for a react + typescript project with eslint/prettier/husky?
r/reactjs on Reddit: What's the best eslint.config.mjs for a react + typescript project with eslint/prettier/husky?
April 29, 2024 -

I follow along the bulletproof-react repo from github and tried to setup my project nearly the same way this best practice project does.

Unfortunately, eslint changed their config syntax to flat configs. I feel stupid to ask but can someone help me converting the bulletproof-react eslintr.js file to a eslint.config.mjs one? Or could you recommend any other ressources to see how you'd set up great linting rules for react typescript projects in 2024?

Would appreciate your help

🌐
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!

🌐
freeCodeCamp
freecodecamp.org › news › how-to-add-eslint-to-your-react-project
How to Add ESLint to Your React Project
August 8, 2023 - You can integrate ESLint seamlessly into your React projects, providing real-time feedback and improving your overall code quality.
🌐
GeeksforGeeks
geeksforgeeks.org › reactjs › how-to-configure-eslint-for-react-projects
How to configure ESLint for React Projects ? - GeeksforGeeks
July 23, 2025 - ESLint in React is a JavaScript linting tool that is used for automatically detecting incorrect patterns found in ECMAScript/JavaScript code.
🌐
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 16982 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
🌐
Eslint-react
eslint-react.xyz › docs › rules › overview
Overview | ESLint React
Naming convention rules enforce consistent naming patterns for React entities. The eslint-plugin-react-debug package is not included in the unified plugin.
🌐
Max Rozen
maxrozen.com › react-hooks-eslint-plugin-saved-hours-debugging-useeffect
How the React Hooks ESLint plugin saved me hours debugging useEffect - Max Rozen
In fact, create-react-app would only tell you about it via a warning, not an error. In our case, the warning would be buried deep in a stack of noisy logs (as part of the review into this type of bug, as a team we decided to make it an error, but it's up to you and your team). Turns out there's an eslint rule specifically for this class of bug: react-hooks/exhaustive-deps, AND it's part of a package maintained by the React team.