{"name":"eslint-plugin-react","version":"7.37.2","keywords":["eslint","eslint-plugin","eslintplugin","react"],"author":{"name":"Yannick Croissant","email":"yannick.croissant+npm@gmail.com"},"license":"MIT","_id":"eslint-plugin-react@7.37.2","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"yannickcr","email":"yannick.croissant+npm@gmail.com"}],"homepage":"https://github.com/jsx-eslint/eslint-plugin-react","bugs":{"url":"https://github.com/jsx-eslint/eslint-plugin-react/issues"},"dist":{"shasum":"cd0935987876ba2900df2f58339f6d92305acc7a","tarball":"http://registry-npm.ywwl.com/eslint-plugin-react/download/eslint-plugin-react-7.37.2.tgz","fileCount":406,"integrity":"sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==","signatures":[{"sig":"MEQCIAbcI0ZnlWHqDuFaguDo8AqP5T/aL2q6OYS2VilEQbFlAiADUk1TXCl0Dr37L8XYjraAB4zA8DuxZJnzmROpu+nxNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941662,"size":186602,"noattachment":false,"key":"/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz"},"main":"index.js","types":"index.d.ts","engines":{"node":">=4"},"gitHead":"256cf74fbd662e183ecd1fca90d6aba82bac8918","scripts":{"lint":"eslint .","test":"npm run unit-test","prelint":"npm run lint:docs","prepack":"npm run build-types && npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","postlint":"npm run type-check","posttest":"npx npm@'>= 10.2' audit --production","lint:docs":"markdownlint \"**/*.md\"","unit-test":"istanbul cover node_modules/mocha/bin/_mocha tests/lib/**/*.js tests/util/**/*.js tests/index.js tests/flat-config.js","type-check":"tsc","build-types":"tsc -p build.tsconfig.json","postlint:docs":"npm run update:eslint-docs -- --check","prebuild-types":"npm run clean-built-types","clean-built-types":"rm -f $(find . -maxdepth 1 -type f -name '*.d.ts*') $(find lib -type f -name '*.d.ts*' ! -name 'types.d.ts')","update:eslint-docs":"eslint-doc-generator"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/jsx-eslint/eslint-plugin-react.git","type":"git"},"_npmVersion":"10.9.0","description":"React specific linting rules for ESLint","directories":{},"_nodeVersion":"22.10.0","dependencies":{"hasown":"^2.0.2","semver":"^6.3.1","resolve":"^2.0.0-next.5","doctrine":"^2.1.0","minimatch":"^3.1.2","estraverse":"^5.3.0","prop-types":"^15.8.1","jsx-ast-utils":"^2.4.1 || ^3.0.0","object.values":"^1.2.0","array-includes":"^3.1.8","object.entries":"^1.1.8","object.fromentries":"^2.0.8","es-iterator-helpers":"^1.1.0","array.prototype.flatmap":"^1.3.2","string.prototype.repeat":"^1.0.0","array.prototype.findlast":"^1.2.5","array.prototype.tosorted":"^1.1.4","string.prototype.matchall":"^4.0.11"},"publishConfig":{"ignore":[".github/","!lib","docs/","test/","test-published-types/","tests/","*.md","*.config.js",".eslint-doc-generatorrc.js",".eslintrc",".editorconfig","tsconfig.json","build.tsconfig.json",".markdownlint*","types","!*.d.ts","!*.d.ts.map"]},"_hasShrinkwrap":false,"devDependencies":{"glob":"=10.3.7","mocha":"^5.2.0","sinon":"^7.5.0","eslint":"^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7","espree":"^3.5.4","istanbul":"^0.4.5","jackspeak":"=2.1.1","npmignore":"^0.3.1","ls-engines":"^0.8.1","typescript":"^3.9.9","@babel/core":"^7.25.9","@types/node":"^4.9.5","babel-eslint":"^8 || ^9 || ^10.1.0","eslint-scope":"^3.7.3","@types/eslint":"=7.2.10","@types/estree":"0.0.52","gfm-footnotes":"^1.0.1","markdownlint-cli":"^0.8.0 || ^0.32.2","@babel/preset-react":"^7.25.9","@babel/eslint-parser":"^7.25.9","eslint-doc-generator":"^1.7.1","eslint-plugin-import":"^2.31.0","eslint-remote-tester":"^3.0.1","typescript-eslint-parser":"^20.1.1","@typescript-eslint/parser":"^2.34.0 || ^3.10.1 || ^4 || ^5 || ^6.20 || ^7.14.1 || ^8.4","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-eslint-plugin":"^2.3.0 || ^3.5.3 || ^4.0.1 || ^5.0.5","@babel/plugin-syntax-decorators":"^7.25.9","eslint-remote-tester-repositories":"^1.0.1","@babel/plugin-syntax-function-bind":"^7.25.9","@babel/plugin-syntax-do-expressions":"^7.25.9"},"peerDependencies":{"eslint":"^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-react_7.37.2_1729634540035_0.7009775864231675","host":"s3://npm-registry-packages"},"readme":"# `eslint-plugin-react` <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n===================\n\n[![github actions][actions-image]][actions-url]\n[![Maintenance Status][status-image]][status-url]\n[![NPM version][npm-image]][npm-url]\n[![Tidelift][tidelift-image]][tidelift-url]\n\nReact specific linting rules for `eslint`\n\n## Installation\n\n```sh\nnpm install eslint eslint-plugin-react --save-dev\n```\n\nIt is also possible to install ESLint globally rather than locally (using `npm install -g eslint`). However, this is not recommended, and any plugins or shareable configs that you use must be installed locally in either case.\n\n## Configuration (legacy: `.eslintrc*`) <a id=\"configuration\"></a>\n\nUse [our preset](#recommended) to get reasonable defaults:\n\n```json\n  \"extends\": [\n    \"eslint:recommended\",\n    \"plugin:react/recommended\"\n  ]\n```\n\nIf you are using the [new JSX transform from React 17](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports), extend [`react/jsx-runtime`](https://github.com/jsx-eslint/eslint-plugin-react/blob/c8917b0885094b5e4cc2a6f613f7fb6f16fe932e/index.js#L163-L176) in your eslint config (add `\"plugin:react/jsx-runtime\"` to `\"extends\"`) to disable the relevant rules.\n\nYou should also specify settings that will be shared across all the plugin rules. ([More about eslint shared settings](https://eslint.org/docs/latest/use/configure/configuration-files#configuring-shared-settings))\n\n```json5\n{\n  \"settings\": {\n    \"react\": {\n      \"createClass\": \"createReactClass\", // Regex for Component Factory to use,\n                                         // default to \"createReactClass\"\n      \"pragma\": \"React\",  // Pragma to use, default to \"React\"\n      \"fragment\": \"Fragment\",  // Fragment to use (may be a property of <pragma>), default to \"Fragment\"\n      \"version\": \"detect\", // React version. \"detect\" automatically picks the version you have installed.\n                           // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.\n                           // Defaults to the \"defaultVersion\" setting and warns if missing, and to \"detect\" in the future\n      \"defaultVersion\": \"\", // Default React version to use when the version you have installed cannot be detected.\n                            // If not provided, defaults to the latest React version.\n      \"flowVersion\": \"0.53\" // Flow version\n    },\n    \"propWrapperFunctions\": [\n        // The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.\n        \"forbidExtraProps\",\n        {\"property\": \"freeze\", \"object\": \"Object\"},\n        {\"property\": \"myFavoriteWrapper\"},\n        // for rules that check exact prop wrappers\n        {\"property\": \"forbidExtraProps\", \"exact\": true}\n    ],\n    \"componentWrapperFunctions\": [\n        // The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped.\n        \"observer\", // `property`\n        {\"property\": \"styled\"}, // `object` is optional\n        {\"property\": \"observer\", \"object\": \"Mobx\"},\n        {\"property\": \"observer\", \"object\": \"<pragma>\"} // sets `object` to whatever value `settings.react.pragma` is set to\n    ],\n    \"formComponents\": [\n      // Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } />\n      \"CustomForm\",\n      {\"name\": \"SimpleForm\", \"formAttribute\": \"endpoint\"},\n      {\"name\": \"Form\", \"formAttribute\": [\"registerEndpoint\", \"loginEndpoint\"]}, // allows specifying multiple properties if necessary\n    ],\n    \"linkComponents\": [\n      // Components used as alternatives to <a> for linking, eg. <Link to={ url } />\n      \"Hyperlink\",\n      {\"name\": \"MyLink\", \"linkAttribute\": \"to\"},\n      {\"name\": \"Link\", \"linkAttribute\": [\"to\", \"href\"]}, // allows specifying multiple properties if necessary\n    ]\n  }\n}\n```\n\nIf you do not use a preset you will need to specify individual rules and add extra configuration.\n\nAdd \"react\" to the plugins section.\n\n```json\n{\n  \"plugins\": [\n    \"react\"\n  ]\n}\n```\n\nEnable JSX support.\n\nWith `eslint` 2+\n\n```json\n{\n  \"parserOptions\": {\n    \"ecmaFeatures\": {\n      \"jsx\": true\n    }\n  }\n}\n```\n\nEnable the rules that you would like to use.\n\n```json\n  \"rules\": {\n    \"react/jsx-uses-react\": \"error\",\n    \"react/jsx-uses-vars\": \"error\",\n  }\n```\n\n### Shareable configs\n\n#### Recommended\n\nThis plugin exports a `recommended` configuration that enforces React good practices.\n\nTo enable this configuration use the `extends` property in your `.eslintrc` config file:\n\n```json\n{\n  \"extends\": [\"eslint:recommended\", \"plugin:react/recommended\"]\n}\n```\n\nSee [`eslint` documentation](https://eslint.org/docs/user-guide/configuring/configuration-files#extending-configuration-files) for more information about extending configuration files.\n\n#### All\n\nThis plugin also exports an `all` configuration that includes every available rule.\nThis pairs well with the `eslint:all` rule.\n\n```json\n{\n  \"plugins\": [\n    \"react\"\n  ],\n  \"extends\": [\"eslint:all\", \"plugin:react/all\"]\n}\n```\n\n**Note**: These configurations will import `eslint-plugin-react` and enable JSX in [parser options](https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options).\n\n## Configuration (new: `eslint.config.js`)\n\nFrom [`v8.21.0`](https://github.com/eslint/eslint/releases/tag/v8.21.0), eslint announced a new config system.\nIn the new system, `.eslintrc*` is no longer used. `eslint.config.js` would be the default config file name.\nIn eslint `v8`, the legacy system (`.eslintrc*`) would still be supported, while in eslint `v9`, only the new system would be supported.\n\nAnd from [`v8.23.0`](https://github.com/eslint/eslint/releases/tag/v8.23.0), eslint CLI starts to look up `eslint.config.js`.\n**So, if your eslint is `>=8.23.0`, you're 100% ready to use the new config system.**\n\nYou might want to check out the official blog posts,\n\n- <https://eslint.org/blog/2022/08/new-config-system-part-1/>\n- <https://eslint.org/blog/2022/08/new-config-system-part-2/>\n- <https://eslint.org/blog/2022/08/new-config-system-part-3/>\n\nand the [official docs](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new).\n\n### Plugin\n\nThe default export of `eslint-plugin-react` is a plugin object.\n\n```js\nconst react = require('eslint-plugin-react');\nconst globals = require('globals');\n\nmodule.exports = [\n  …\n  {\n    files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],\n    plugins: {\n      react,\n    },\n    languageOptions: {\n      parserOptions: {\n        ecmaFeatures: {\n          jsx: true,\n        },\n      },\n      globals: {\n        ...globals.browser,\n      },\n    },\n    rules: {\n      // ... any rules you want\n      'react/jsx-uses-react': 'error',\n      'react/jsx-uses-vars': 'error',\n     },\n    // ... others are omitted for brevity\n  },\n  …\n];\n```\n\n### Configuring shared settings\n\nRefer to the [official docs](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-shared-settings).\n\nThe schema of the `settings.react` object would be identical to that of what's already described above in the legacy config section.\n\n<!-- markdownlint-disable-next-line no-duplicate-heading -->\n### Flat Configs\n\nThis plugin exports 3 flat configs:\n\n- `flat.all`\n- `flat.recommended`\n- `flat['jsx-runtime']`\n\nThe flat configs are available via the root plugin import. They will configure the plugin under the `react/` namespace and enable JSX in [`languageOptions.parserOptions`](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options).\n\n```js\nconst reactPlugin = require('eslint-plugin-react');\n\nmodule.exports = [\n  …\n  reactPlugin.configs.flat.recommended, // This is not a plugin object, but a shareable config object\n  reactPlugin.configs.flat['jsx-runtime'], // Add this if you are using React 17+\n  …\n];\n```\n\nYou can of course add/override some properties.\n\n**Note**: Our shareable configs does not preconfigure `files` or [`languageOptions.globals`](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuration-objects).\nFor most of the cases, you probably want to configure some properties by yourself.\n\n```js\nconst reactPlugin = require('eslint-plugin-react');\nconst globals = require('globals');\n\nmodule.exports = [\n  …\n  {\n    files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n    ...reactPlugin.configs.flat.recommended,\n    languageOptions: {\n      ...reactPlugin.configs.flat.recommended.languageOptions,\n      globals: {\n        ...globals.serviceworker,\n        ...globals.browser,\n      },\n    },\n  },\n  …\n];\n```\n\nThe above example is same as the example below, as the new config system is based on chaining.\n\n```js\nconst reactPlugin = require('eslint-plugin-react');\nconst globals = require('globals');\n\nmodule.exports = [\n  …\n  {\n    files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n    ...reactPlugin.configs.flat.recommended,\n  },\n  {\n    files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n    languageOptions: {\n      globals: {\n        ...globals.serviceworker,\n        ...globals.browser,\n      },\n    },\n  },\n  …\n];\n```\n\n## List of supported rules\n\n<!-- begin auto-generated rules list -->\n\n💼 [Configurations](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs) enabled in.\\\n🚫 [Configurations](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs) disabled in.\\\n🏃 Set in the `jsx-runtime` [configuration](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs).\\\n☑️ Set in the `recommended` [configuration](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs).\\\n🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\\\n💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\\\n❌ Deprecated.\n\n| Name                                                                                         | Description                                                                                                                                  | 💼 | 🚫 | 🔧 | 💡 | ❌  |\n| :------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------- | :- | :- | :- | :- | :- |\n| [boolean-prop-naming](docs/rules/boolean-prop-naming.md)                                     | Enforces consistent naming for boolean props                                                                                                 |    |    |    |    |    |\n| [button-has-type](docs/rules/button-has-type.md)                                             | Disallow usage of `button` elements without an explicit `type` attribute                                                                     |    |    |    |    |    |\n| [checked-requires-onchange-or-readonly](docs/rules/checked-requires-onchange-or-readonly.md) | Enforce using `onChange` or `readonly` attribute when `checked` is used                                                                      |    |    |    |    |    |\n| [default-props-match-prop-types](docs/rules/default-props-match-prop-types.md)               | Enforce all defaultProps have a corresponding non-required PropType                                                                          |    |    |    |    |    |\n| [destructuring-assignment](docs/rules/destructuring-assignment.md)                           | Enforce consistent usage of destructuring assignment of props, state, and context                                                            |    |    | 🔧 |    |    |\n| [display-name](docs/rules/display-name.md)                                                   | Disallow missing displayName in a React component definition                                                                                 | ☑️ |    |    |    |    |\n| [forbid-component-props](docs/rules/forbid-component-props.md)                               | Disallow certain props on components                                                                                                         |    |    |    |    |    |\n| [forbid-dom-props](docs/rules/forbid-dom-props.md)                                           | Disallow certain props on DOM Nodes                                                                                                          |    |    |    |    |    |\n| [forbid-elements](docs/rules/forbid-elements.md)                                             | Disallow certain elements                                                                                                                    |    |    |    |    |    |\n| [forbid-foreign-prop-types](docs/rules/forbid-foreign-prop-types.md)                         | Disallow using another component's propTypes                                                                                                 |    |    |    |    |    |\n| [forbid-prop-types](docs/rules/forbid-prop-types.md)                                         | Disallow certain propTypes                                                                                                                   |    |    |    |    |    |\n| [forward-ref-uses-ref](docs/rules/forward-ref-uses-ref.md)                                   | Require all forwardRef components include a ref parameter                                                                                    |    |    |    | 💡 |    |\n| [function-component-definition](docs/rules/function-component-definition.md)                 | Enforce a specific function type for function components                                                                                     |    |    | 🔧 |    |    |\n| [hook-use-state](docs/rules/hook-use-state.md)                                               | Ensure destructuring and symmetric naming of useState hook value and setter variables                                                        |    |    |    | 💡 |    |\n| [iframe-missing-sandbox](docs/rules/iframe-missing-sandbox.md)                               | Enforce sandbox attribute on iframe elements                                                                                                 |    |    |    |    |    |\n| [jsx-boolean-value](docs/rules/jsx-boolean-value.md)                                         | Enforce boolean attributes notation in JSX                                                                                                   |    |    | 🔧 |    |    |\n| [jsx-child-element-spacing](docs/rules/jsx-child-element-spacing.md)                         | Enforce or disallow spaces inside of curly braces in JSX attributes and expressions                                                          |    |    |    |    |    |\n| [jsx-closing-bracket-location](docs/rules/jsx-closing-bracket-location.md)                   | Enforce closing bracket location in JSX                                                                                                      |    |    | 🔧 |    |    |\n| [jsx-closing-tag-location](docs/rules/jsx-closing-tag-location.md)                           | Enforce closing tag location for multiline JSX                                                                                               |    |    | 🔧 |    |    |\n| [jsx-curly-brace-presence](docs/rules/jsx-curly-brace-presence.md)                           | Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes |    |    | 🔧 |    |    |\n| [jsx-curly-newline](docs/rules/jsx-curly-newline.md)                                         | Enforce consistent linebreaks in curly braces in JSX attributes and expressions                                                              |    |    | 🔧 |    |    |\n| [jsx-curly-spacing](docs/rules/jsx-curly-spacing.md)                                         | Enforce or disallow spaces inside of curly braces in JSX attributes and expressions                                                          |    |    | 🔧 |    |    |\n| [jsx-equals-spacing](docs/rules/jsx-equals-spacing.md)                                       | Enforce or disallow spaces around equal signs in JSX attributes                                                                              |    |    | 🔧 |    |    |\n| [jsx-filename-extension](docs/rules/jsx-filename-extension.md)                               | Disallow file extensions that may contain JSX                                                                                                |    |    |    |    |    |\n| [jsx-first-prop-new-line](docs/rules/jsx-first-prop-new-line.md)                             | Enforce proper position of the first property in JSX                                                                                         |    |    | 🔧 |    |    |\n| [jsx-fragments](docs/rules/jsx-fragments.md)                                                 | Enforce shorthand or standard form for React fragments                                                                                       |    |    | 🔧 |    |    |\n| [jsx-handler-names](docs/rules/jsx-handler-names.md)                                         | Enforce event handler naming conventions in JSX                                                                                              |    |    |    |    |    |\n| [jsx-indent](docs/rules/jsx-indent.md)                                                       | Enforce JSX indentation                                                                                                                      |    |    | 🔧 |    |    |\n| [jsx-indent-props](docs/rules/jsx-indent-props.md)                                           | Enforce props indentation in JSX                                                                                                             |    |    | 🔧 |    |    |\n| [jsx-key](docs/rules/jsx-key.md)                                                             | Disallow missing `key` props in iterators/collection literals                                                                                | ☑️ |    |    |    |    |\n| [jsx-max-depth](docs/rules/jsx-max-depth.md)                                                 | Enforce JSX maximum depth                                                                                                                    |    |    |    |    |    |\n| [jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md)                               | Enforce maximum of props on a single line in JSX                                                                                             |    |    | 🔧 |    |    |\n| [jsx-newline](docs/rules/jsx-newline.md)                                                     | Require or prevent a new line after jsx elements and expressions.                                                                            |    |    | 🔧 |    |    |\n| [jsx-no-bind](docs/rules/jsx-no-bind.md)                                                     | Disallow `.bind()` or arrow functions in JSX props                                                                                           |    |    |    |    |    |\n| [jsx-no-comment-textnodes](docs/rules/jsx-no-comment-textnodes.md)                           | Disallow comments from being inserted as text nodes                                                                                          | ☑️ |    |    |    |    |\n| [jsx-no-constructed-context-values](docs/rules/jsx-no-constructed-context-values.md)         | Disallows JSX context provider values from taking values that will cause needless rerenders                                                  |    |    |    |    |    |\n| [jsx-no-duplicate-props](docs/rules/jsx-no-duplicate-props.md)                               | Disallow duplicate properties in JSX                                                                                                         | ☑️ |    |    |    |    |\n| [jsx-no-leaked-render](docs/rules/jsx-no-leaked-render.md)                                   | Disallow problematic leaked values from being rendered                                                                                       |    |    | 🔧 |    |    |\n| [jsx-no-literals](docs/rules/jsx-no-literals.md)                                             | Disallow usage of string literals in JSX                                                                                                     |    |    |    |    |    |\n| [jsx-no-script-url](docs/rules/jsx-no-script-url.md)                                         | Disallow usage of `javascript:` URLs                                                                                                         |    |    |    |    |    |\n| [jsx-no-target-blank](docs/rules/jsx-no-target-blank.md)                                     | Disallow `target=\"_blank\"` attribute without `rel=\"noreferrer\"`                                                                              | ☑️ |    | 🔧 |    |    |\n| [jsx-no-undef](docs/rules/jsx-no-undef.md)                                                   | Disallow undeclared variables in JSX                                                                                                         | ☑️ |    |    |    |    |\n| [jsx-no-useless-fragment](docs/rules/jsx-no-useless-fragment.md)                             | Disallow unnecessary fragments                                                                                                               |    |    | 🔧 |    |    |\n| [jsx-one-expression-per-line](docs/rules/jsx-one-expression-per-line.md)                     | Require one JSX element per line                                                                                                             |    |    | 🔧 |    |    |\n| [jsx-pascal-case](docs/rules/jsx-pascal-case.md)                                             | Enforce PascalCase for user-defined JSX components                                                                                           |    |    |    |    |    |\n| [jsx-props-no-multi-spaces](docs/rules/jsx-props-no-multi-spaces.md)                         | Disallow multiple spaces between inline JSX props                                                                                            |    |    | 🔧 |    |    |\n| [jsx-props-no-spread-multi](docs/rules/jsx-props-no-spread-multi.md)                         | Disallow JSX prop spreading the same identifier multiple times                                                                               |    |    |    |    |    |\n| [jsx-props-no-spreading](docs/rules/jsx-props-no-spreading.md)                               | Disallow JSX prop spreading                                                                                                                  |    |    |    |    |    |\n| [jsx-sort-default-props](docs/rules/jsx-sort-default-props.md)                               | Enforce defaultProps declarations alphabetical sorting                                                                                       |    |    |    |    | ❌  |\n| [jsx-sort-props](docs/rules/jsx-sort-props.md)                                               | Enforce props alphabetical sorting                                                                                                           |    |    | 🔧 |    |    |\n| [jsx-space-before-closing](docs/rules/jsx-space-before-closing.md)                           | Enforce spacing before closing bracket in JSX                                                                                                |    |    | 🔧 |    | ❌  |\n| [jsx-tag-spacing](docs/rules/jsx-tag-spacing.md)                                             | Enforce whitespace in and around the JSX opening and closing brackets                                                                        |    |    | 🔧 |    |    |\n| [jsx-uses-react](docs/rules/jsx-uses-react.md)                                               | Disallow React to be incorrectly marked as unused                                                                                            | ☑️ | 🏃 |    |    |    |\n| [jsx-uses-vars](docs/rules/jsx-uses-vars.md)                                                 | Disallow variables used in JSX to be incorrectly marked as unused                                                                            | ☑️ |    |    |    |    |\n| [jsx-wrap-multilines](docs/rules/jsx-wrap-multilines.md)                                     | Disallow missing parentheses around multiline JSX                                                                                            |    |    | 🔧 |    |    |\n| [no-access-state-in-setstate](docs/rules/no-access-state-in-setstate.md)                     | Disallow when this.state is accessed within setState                                                                                         |    |    |    |    |    |\n| [no-adjacent-inline-elements](docs/rules/no-adjacent-inline-elements.md)                     | Disallow adjacent inline elements not separated by whitespace.                                                                               |    |    |    |    |    |\n| [no-array-index-key](docs/rules/no-array-index-key.md)                                       | Disallow usage of Array index in keys                                                                                                        |    |    |    |    |    |\n| [no-arrow-function-lifecycle](docs/rules/no-arrow-function-lifecycle.md)                     | Lifecycle methods should be methods on the prototype, not class fields                                                                       |    |    | 🔧 |    |    |\n| [no-children-prop](docs/rules/no-children-prop.md)                                           | Disallow passing of children as props                                                                                                        | ☑️ |    |    |    |    |\n| [no-danger](docs/rules/no-danger.md)                                                         | Disallow usage of dangerous JSX properties                                                                                                   |    |    |    |    |    |\n| [no-danger-with-children](docs/rules/no-danger-with-children.md)                             | Disallow when a DOM element is using both children and dangerouslySetInnerHTML                                                               | ☑️ |    |    |    |    |\n| [no-deprecated](docs/rules/no-deprecated.md)                                                 | Disallow usage of deprecated methods                                                                                                         | ☑️ |    |    |    |    |\n| [no-did-mount-set-state](docs/rules/no-did-mount-set-state.md)                               | Disallow usage of setState in componentDidMount                                                                                              |    |    |    |    |    |\n| [no-did-update-set-state](docs/rules/no-did-update-set-state.md)                             | Disallow usage of setState in componentDidUpdate                                                                                             |    |    |    |    |    |\n| [no-direct-mutation-state](docs/rules/no-direct-mutation-state.md)                           | Disallow direct mutation of this.state                                                                                                       | ☑️ |    |    |    |    |\n| [no-find-dom-node](docs/rules/no-find-dom-node.md)                                           | Disallow usage of findDOMNode                                                                                                                | ☑️ |    |    |    |    |\n| [no-invalid-html-attribute](docs/rules/no-invalid-html-attribute.md)                         | Disallow usage of invalid attributes                                                                                                         |    |    |    | 💡 |    |\n| [no-is-mounted](docs/rules/no-is-mounted.md)                                                 | Disallow usage of isMounted                                                                                                                  | ☑️ |    |    |    |    |\n| [no-multi-comp](docs/rules/no-multi-comp.md)                                                 | Disallow multiple component definition per file                                                                                              |    |    |    |    |    |\n| [no-namespace](docs/rules/no-namespace.md)                                                   | Enforce that namespaces are not used in React elements                                                                                       |    |    |    |    |    |\n| [no-object-type-as-default-prop](docs/rules/no-object-type-as-default-prop.md)               | Disallow usage of referential-type variables as default param in functional component                                                        |    |    |    |    |    |\n| [no-redundant-should-component-update](docs/rules/no-redundant-should-component-update.md)   | Disallow usage of shouldComponentUpdate when extending React.PureComponent                                                                   |    |    |    |    |    |\n| [no-render-return-value](docs/rules/no-render-return-value.md)                               | Disallow usage of the return value of ReactDOM.render                                                                                        | ☑️ |    |    |    |    |\n| [no-set-state](docs/rules/no-set-state.md)                                                   | Disallow usage of setState                                                                                                                   |    |    |    |    |    |\n| [no-string-refs](docs/rules/no-string-refs.md)                                               | Disallow using string references                                                                                                             | ☑️ |    |    |    |    |\n| [no-this-in-sfc](docs/rules/no-this-in-sfc.md)                                               | Disallow `this` from being used in stateless functional components                                                                           |    |    |    |    |    |\n| [no-typos](docs/rules/no-typos.md)                                                           | Disallow common typos                                                                                                                        |    |    |    |    |    |\n| [no-unescaped-entities](docs/rules/no-unescaped-entities.md)                                 | Disallow unescaped HTML entities from appearing in markup                                                                                    | ☑️ |    |    | 💡 |    |\n| [no-unknown-property](docs/rules/no-unknown-property.md)                                     | Disallow usage of unknown DOM property                                                                                                       | ☑️ |    | 🔧 |    |    |\n| [no-unsafe](docs/rules/no-unsafe.md)                                                         | Disallow usage of unsafe lifecycle methods                                                                                                   |    | ☑️ |    |    |    |\n| [no-unstable-nested-components](docs/rules/no-unstable-nested-components.md)                 | Disallow creating unstable components inside components                                                                                      |    |    |    |    |    |\n| [no-unused-class-component-methods](docs/rules/no-unused-class-component-methods.md)         | Disallow declaring unused methods of component class                                                                                         |    |    |    |    |    |\n| [no-unused-prop-types](docs/rules/no-unused-prop-types.md)                                   | Disallow definitions of unused propTypes                                                                                                     |    |    |    |    |    |\n| [no-unused-state](docs/rules/no-unused-state.md)                                             | Disallow definitions of unused state                                                                                                         |    |    |    |    |    |\n| [no-will-update-set-state](docs/rules/no-will-update-set-state.md)                           | Disallow usage of setState in componentWillUpdate                                                                                            |    |    |    |    |    |\n| [prefer-es6-class](docs/rules/prefer-es6-class.md)                                           | Enforce ES5 or ES6 class for React Components                                                                                                |    |    |    |    |    |\n| [prefer-exact-props](docs/rules/prefer-exact-props.md)                                       | Prefer exact proptype definitions                                                                                                            |    |    |    |    |    |\n| [prefer-read-only-props](docs/rules/prefer-read-only-props.md)                               | Enforce that props are read-only                                                                                                             |    |    | 🔧 |    |    |\n| [prefer-stateless-function](docs/rules/prefer-stateless-function.md)                         | Enforce stateless components to be written as a pure function                                                                                |    |    |    |    |    |\n| [prop-types](docs/rules/prop-types.md)                                                       | Disallow missing props validation in a React component definition                                                                            | ☑️ |    |    |    |    |\n| [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md)                                       | Disallow missing React when using JSX                                                                                                        | ☑️ | 🏃 |    |    |    |\n| [require-default-props](docs/rules/require-default-props.md)                                 | Enforce a defaultProps definition for every prop that is not a required prop                                                                 |    |    |    |    |    |\n| [require-optimization](docs/rules/require-optimization.md)                                   | Enforce React components to have a shouldComponentUpdate method                                                                              |    |    |    |    |    |\n| [require-render-return](docs/rules/require-render-return.md)                                 | Enforce ES5 or ES6 class for returning value in render function                                                                              | ☑️ |    |    |    |    |\n| [self-closing-comp](docs/rules/self-closing-comp.md)                                         | Disallow extra closing tags for components without children                                                                                  |    |    | 🔧 |    |    |\n| [sort-comp](docs/rules/sort-comp.md)                                                         | Enforce component methods order                                                                                                              |    |    |    |    |    |\n| [sort-default-props](docs/rules/sort-default-props.md)                                       | Enforce defaultProps declarations alphabetical sorting                                                                                       |    |    |    |    |    |\n| [sort-prop-types](docs/rules/sort-prop-types.md)                                             | Enforce propTypes declarations alphabetical sorting                                                                                          |    |    | 🔧 |    |    |\n| [state-in-constructor](docs/rules/state-in-constructor.md)                                   | Enforce class component state initialization style                                                                                           |    |    |    |    |    |\n| [static-property-placement](docs/rules/static-property-placement.md)                         | Enforces where React component static properties should be positioned.                                                                       |    |    |    |    |    |\n| [style-prop-object](docs/rules/style-prop-object.md)                                         | Enforce style prop value is an object                                                                                                        |    |    |    |    |    |\n| [void-dom-elements-no-children](docs/rules/void-dom-elements-no-children.md)                 | Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children                                                                |    |    |    |    |    |\n\n<!-- end auto-generated rules list -->\n\n## Other useful plugins\n\n- Rules of Hooks: [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks)\n- JSX accessibility: [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)\n- React Native: [eslint-plugin-react-native](https://github.com/Intellicode/eslint-plugin-react-native)\n\n## License\n\n`eslint-plugin-react` is licensed under the [MIT License](https://opensource.org/licenses/mit-license.php).\n\n[npm-url]: https://npmjs.org/package/eslint-plugin-react\n[npm-image]: https://img.shields.io/npm/v/eslint-plugin-react.svg\n\n[status-url]: https://github.com/jsx-eslint/eslint-plugin-react/pulse\n[status-image]: https://img.shields.io/github/last-commit/jsx-eslint/eslint-plugin-react.svg\n\n[tidelift-url]: https://tidelift.com/subscription/pkg/npm-eslint-plugin-react?utm_source=npm-eslint-plugin-react&utm_medium=referral&utm_campaign=readme\n[tidelift-image]: https://tidelift.com/badges/package/npm/eslint-plugin-react?style=flat\n\n[package-url]: https://npmjs.org/package/eslint-plugin-react\n[npm-version-svg]: https://versionbadg.es/jsx-eslint/eslint-plugin-react.svg\n\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/jsx-eslint/eslint-plugin-react\n[actions-url]: https://github.com/jsx-eslint/eslint-plugin-react/actions\n","publish_time":1729634540295,"_cnpm_publish_time":1729634540295,"dist-tags":{"latest":"7.37.5","next":"7.8.0-rc.0"}}