# React recommended

The recommended set from eslint-plugin-react: missing keys, unknown DOM properties, unescaped entities and similar mistakes.

- Linter: ESLint
- Package: `eslint-plugin-react` (https://github.com/jsx-eslint/eslint-plugin-react#flat-configs)
- Author: jsx-eslint (official)
- Rules: 21
- Weekly downloads: 81.1M, +34.1% last quarter
- Technologies: react (21)

## Install

```sh
npm install -D eslint eslint-plugin-react
pnpm add -D eslint eslint-plugin-react
yarn add -D eslint eslint-plugin-react
bun add -d eslint eslint-plugin-react
```

## Config: `eslint.config.js`

```js
// eslint.config.js
import react from "eslint-plugin-react";

export default [
  react.configs.flat.recommended,
];
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [react/jsx-no-comment-textnodes](https://lintradar.dev/rules/react/jsx-no-comment-textnodes.md) | error | Disallow comments from being inserted as text nodes | 167.2M |
| [react/jsx-no-duplicate-props](https://lintradar.dev/rules/react/jsx-no-duplicate-props.md) | error | Disallow duplicate properties in JSX | 167.2M |
| [react/no-danger-with-children](https://lintradar.dev/rules/react/no-danger-with-children.md) | error | Disallow when a DOM element is using both children and dangerouslySetInnerHTML | 166M |
| [react/no-string-refs](https://lintradar.dev/rules/react/no-string-refs.md) | error | Disallow using string references | 163.2M |
| [react/no-children-prop](https://lintradar.dev/rules/react/no-children-prop.md) | error | Disallow passing of children as props | 161.9M |
| [react/no-render-return-value](https://lintradar.dev/rules/react/no-render-return-value.md) | error | Disallow usage of the return value of ReactDOM.render | 161.9M |
| [react/jsx-key](https://lintradar.dev/rules/react/jsx-key.md) | error | Disallow missing `key` props in iterators/collection literals | 158.5M |
| [react/jsx-no-undef](https://lintradar.dev/rules/react/jsx-no-undef.md) | error | Disallow undeclared variables in JSX | 136.7M |
| [react/no-is-mounted](https://lintradar.dev/rules/react/no-is-mounted.md) | error | Disallow usage of isMounted | 135.4M |
| [react/require-render-return](https://lintradar.dev/rules/react/require-render-return.md) | error | Enforce ES5 or ES6 class for returning value in render function | 135.4M |
| [react/jsx-uses-react](https://lintradar.dev/rules/react/jsx-uses-react.md) | error | Disallow React to be incorrectly marked as unused | 132.6M |
| [react/jsx-uses-vars](https://lintradar.dev/rules/react/jsx-uses-vars.md) | error | Disallow variables used in JSX to be incorrectly marked as unused | 132.6M |
| [react/no-direct-mutation-state](https://lintradar.dev/rules/react/no-direct-mutation-state.md) | error | Disallow direct mutation of this.state | 132M |
| [react/no-find-dom-node](https://lintradar.dev/rules/react/no-find-dom-node.md) | error | Disallow usage of findDOMNode | 131.4M |
| [react/no-unescaped-entities](https://lintradar.dev/rules/react/no-unescaped-entities.md) | error | Disallow unescaped HTML entities from appearing in markup | 131.4M |
| [react/no-deprecated](https://lintradar.dev/rules/react/no-deprecated.md) | error | Disallow usage of deprecated methods | 131.4M |
| [react/display-name](https://lintradar.dev/rules/react/display-name.md) | error | Disallow missing displayName in a React component definition | 128M |
| [react/jsx-no-target-blank](https://lintradar.dev/rules/react/jsx-no-target-blank.md) | error | Disallow `target="_blank"` attribute without `rel="noreferrer"` | 119.1M |
| [react/no-unknown-property](https://lintradar.dev/rules/react/no-unknown-property.md) | error | Disallow usage of unknown DOM property | 84.5M |
| [react/react-in-jsx-scope](https://lintradar.dev/rules/react/react-in-jsx-scope.md) | error | Disallow missing React when using JSX | 84.5M |
| [react/prop-types](https://lintradar.dev/rules/react/prop-types.md) | error | Disallow missing props validation in a React component definition | 84.5M |

---

Web page: https://lintradar.dev/presets/react-recommended. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
