From 1e16be1dc5b1a5ac6fb2777d186d8f9a61d44638 Mon Sep 17 00:00:00 2001
From: Bryan Mishkin <698306+bmish@users.noreply.github.com>
Date: Thu, 20 Oct 2022 13:43:13 -0400
Subject: [PATCH] [Docs] automate doc generation with `eslint-doc-generator`
(#3469)
---
.github/workflows/readme.yml | 17 --
CHANGELOG.md | 2 +
README.md | 222 +++++++++---------
docs/rules/boolean-prop-naming.md | 4 +-
docs/rules/button-has-type.md | 4 +-
docs/rules/default-props-match-prop-types.md | 4 +-
docs/rules/destructuring-assignment.md | 6 +-
docs/rules/display-name.md | 6 +-
docs/rules/forbid-component-props.md | 4 +-
docs/rules/forbid-dom-props.md | 4 +-
docs/rules/forbid-elements.md | 4 +-
docs/rules/forbid-foreign-prop-types.md | 4 +-
docs/rules/forbid-prop-types.md | 4 +-
docs/rules/function-component-definition.md | 6 +-
docs/rules/hook-use-state.md | 6 +-
docs/rules/iframe-missing-sandbox.md | 4 +-
docs/rules/jsx-boolean-value.md | 6 +-
docs/rules/jsx-child-element-spacing.md | 4 +-
docs/rules/jsx-closing-bracket-location.md | 6 +-
docs/rules/jsx-closing-tag-location.md | 6 +-
docs/rules/jsx-curly-brace-presence.md | 6 +-
docs/rules/jsx-curly-newline.md | 6 +-
docs/rules/jsx-curly-spacing.md | 6 +-
docs/rules/jsx-equals-spacing.md | 6 +-
docs/rules/jsx-filename-extension.md | 4 +-
docs/rules/jsx-first-prop-new-line.md | 6 +-
docs/rules/jsx-fragments.md | 6 +-
docs/rules/jsx-handler-names.md | 4 +-
docs/rules/jsx-indent-props.md | 6 +-
docs/rules/jsx-indent.md | 6 +-
docs/rules/jsx-key.md | 6 +-
docs/rules/jsx-max-depth.md | 4 +-
docs/rules/jsx-max-props-per-line.md | 6 +-
docs/rules/jsx-newline.md | 6 +-
docs/rules/jsx-no-bind.md | 4 +-
docs/rules/jsx-no-comment-textnodes.md | 6 +-
.../jsx-no-constructed-context-values.md | 4 +-
docs/rules/jsx-no-duplicate-props.md | 6 +-
docs/rules/jsx-no-leaked-render.md | 6 +-
docs/rules/jsx-no-literals.md | 4 +-
docs/rules/jsx-no-script-url.md | 4 +-
docs/rules/jsx-no-target-blank.md | 8 +-
docs/rules/jsx-no-undef.md | 6 +-
docs/rules/jsx-no-useless-fragment.md | 6 +-
docs/rules/jsx-one-expression-per-line.md | 6 +-
docs/rules/jsx-pascal-case.md | 4 +-
docs/rules/jsx-props-no-multi-spaces.md | 6 +-
docs/rules/jsx-props-no-spreading.md | 4 +-
docs/rules/jsx-sort-default-props.md | 5 +-
docs/rules/jsx-sort-props.md | 6 +-
docs/rules/jsx-space-before-closing.md | 10 +-
docs/rules/jsx-tag-spacing.md | 6 +-
docs/rules/jsx-uses-react.md | 6 +-
docs/rules/jsx-uses-vars.md | 6 +-
docs/rules/jsx-wrap-multilines.md | 6 +-
docs/rules/no-access-state-in-setstate.md | 4 +-
docs/rules/no-adjacent-inline-elements.md | 4 +-
docs/rules/no-array-index-key.md | 4 +-
docs/rules/no-arrow-function-lifecycle.md | 6 +-
docs/rules/no-children-prop.md | 6 +-
docs/rules/no-danger-with-children.md | 6 +-
docs/rules/no-danger.md | 4 +-
docs/rules/no-deprecated.md | 6 +-
docs/rules/no-did-mount-set-state.md | 4 +-
docs/rules/no-did-update-set-state.md | 4 +-
docs/rules/no-direct-mutation-state.md | 6 +-
docs/rules/no-find-dom-node.md | 6 +-
docs/rules/no-invalid-html-attribute.md | 6 +-
docs/rules/no-is-mounted.md | 6 +-
docs/rules/no-multi-comp.md | 4 +-
docs/rules/no-namespace.md | 4 +-
.../no-redundant-should-component-update.md | 4 +-
docs/rules/no-render-return-value.md | 6 +-
docs/rules/no-set-state.md | 4 +-
docs/rules/no-string-refs.md | 6 +-
docs/rules/no-this-in-sfc.md | 4 +-
docs/rules/no-typos.md | 4 +-
docs/rules/no-unescaped-entities.md | 6 +-
docs/rules/no-unknown-property.md | 8 +-
docs/rules/no-unsafe.md | 6 +-
docs/rules/no-unstable-nested-components.md | 9 +-
.../no-unused-class-component-methods.md | 4 +-
docs/rules/no-unused-prop-types.md | 4 +-
docs/rules/no-unused-state.md | 4 +-
docs/rules/no-will-update-set-state.md | 4 +-
docs/rules/prefer-es6-class.md | 4 +-
docs/rules/prefer-exact-props.md | 4 +-
docs/rules/prefer-read-only-props.md | 6 +-
docs/rules/prefer-stateless-function.md | 4 +-
docs/rules/prop-types.md | 6 +-
docs/rules/react-in-jsx-scope.md | 6 +-
docs/rules/require-default-props.md | 4 +-
docs/rules/require-optimization.md | 4 +-
docs/rules/require-render-return.md | 6 +-
docs/rules/self-closing-comp.md | 6 +-
docs/rules/sort-comp.md | 4 +-
docs/rules/sort-prop-types.md | 5 +-
docs/rules/state-in-constructor.md | 4 +-
docs/rules/static-property-placement.md | 4 +-
docs/rules/style-prop-object.md | 4 +-
docs/rules/void-dom-elements-no-children.md | 4 +-
lib/rules/jsx-space-before-closing.js | 1 +
markdown.config.js | 41 ----
package.json | 6 +-
tests/index.js | 111 ---------
105 files changed, 396 insertions(+), 511 deletions(-)
delete mode 100644 .github/workflows/readme.yml
delete mode 100644 markdown.config.js
diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml
deleted file mode 100644
index 3b2903532e..0000000000
--- a/.github/workflows/readme.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: 'Tests: readme'
-
-on: [pull_request, push]
-
-jobs:
- readme:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - uses: ljharb/actions/node/install@main
- name: 'nvm install lts/* && npm install'
- with:
- node-version: 'lts/*'
- env:
- NPM_CONFIG_LEGACY_PEER_DEPS: true
- - run: npm run generate-list-of-rules:check
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cdc8501360..2be805018a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,8 +11,10 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
### Changed
* [Perf] component detection: improve performance by avoiding traversing parents unnecessarily ([#3459][] @golopot)
* [Docs] `forbid-component-props`: inclusive language w/ allowlist ([#3473][] @AndersDJohnson)
+* [Docs] automate doc generation with `eslint-doc-generator` ([#3469][] @bmish)
[#3473]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3473
+[#3469]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3469
[#3464]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3464
[#3459]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3459
diff --git a/README.md b/README.md
index a7c98e5739..269d0c7e10 100644
--- a/README.md
+++ b/README.md
@@ -111,119 +111,115 @@ Enable the rules that you would like to use.
## List of supported rules
-✔: Enabled in the [`recommended`](#recommended) configuration.\
-🔧: Fixable with [`eslint --fix`](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems).\
-💡: Provides editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
-
-
-| ✔ | 🔧 | 💡 | Rule | Description |
-| :---: | :---: | :---: | :--- | :--- |
-| | | | [react/boolean-prop-naming](docs/rules/boolean-prop-naming.md) | Enforces consistent naming for boolean props |
-| | | | [react/button-has-type](docs/rules/button-has-type.md) | Disallow usage of `button` elements without an explicit `type` attribute |
-| | | | [react/default-props-match-prop-types](docs/rules/default-props-match-prop-types.md) | Enforce all defaultProps have a corresponding non-required PropType |
-| | 🔧 | | [react/destructuring-assignment](docs/rules/destructuring-assignment.md) | Enforce consistent usage of destructuring assignment of props, state, and context |
-| ✔ | | | [react/display-name](docs/rules/display-name.md) | Disallow missing displayName in a React component definition |
-| | | | [react/forbid-component-props](docs/rules/forbid-component-props.md) | Disallow certain props on components |
-| | | | [react/forbid-dom-props](docs/rules/forbid-dom-props.md) | Disallow certain props on DOM Nodes |
-| | | | [react/forbid-elements](docs/rules/forbid-elements.md) | Disallow certain elements |
-| | | | [react/forbid-foreign-prop-types](docs/rules/forbid-foreign-prop-types.md) | Disallow using another component's propTypes |
-| | | | [react/forbid-prop-types](docs/rules/forbid-prop-types.md) | Disallow certain propTypes |
-| | 🔧 | | [react/function-component-definition](docs/rules/function-component-definition.md) | Enforce a specific function type for function components |
-| | | 💡 | [react/hook-use-state](docs/rules/hook-use-state.md) | Ensure destructuring and symmetric naming of useState hook value and setter variables |
-| | | | [react/iframe-missing-sandbox](docs/rules/iframe-missing-sandbox.md) | Enforce sandbox attribute on iframe elements |
-| | | | [react/no-access-state-in-setstate](docs/rules/no-access-state-in-setstate.md) | Disallow when this.state is accessed within setState |
-| | | | [react/no-adjacent-inline-elements](docs/rules/no-adjacent-inline-elements.md) | Disallow adjacent inline elements not separated by whitespace. |
-| | | | [react/no-array-index-key](docs/rules/no-array-index-key.md) | Disallow usage of Array index in keys |
-| | 🔧 | | [react/no-arrow-function-lifecycle](docs/rules/no-arrow-function-lifecycle.md) | Lifecycle methods should be methods on the prototype, not class fields |
-| ✔ | | | [react/no-children-prop](docs/rules/no-children-prop.md) | Disallow passing of children as props |
-| | | | [react/no-danger](docs/rules/no-danger.md) | Disallow usage of dangerous JSX properties |
-| ✔ | | | [react/no-danger-with-children](docs/rules/no-danger-with-children.md) | Disallow when a DOM element is using both children and dangerouslySetInnerHTML |
-| ✔ | | | [react/no-deprecated](docs/rules/no-deprecated.md) | Disallow usage of deprecated methods |
-| | | | [react/no-did-mount-set-state](docs/rules/no-did-mount-set-state.md) | Disallow usage of setState in componentDidMount |
-| | | | [react/no-did-update-set-state](docs/rules/no-did-update-set-state.md) | Disallow usage of setState in componentDidUpdate |
-| ✔ | | | [react/no-direct-mutation-state](docs/rules/no-direct-mutation-state.md) | Disallow direct mutation of this.state |
-| ✔ | | | [react/no-find-dom-node](docs/rules/no-find-dom-node.md) | Disallow usage of findDOMNode |
-| | 🔧 | | [react/no-invalid-html-attribute](docs/rules/no-invalid-html-attribute.md) | Disallow usage of invalid attributes |
-| ✔ | | | [react/no-is-mounted](docs/rules/no-is-mounted.md) | Disallow usage of isMounted |
-| | | | [react/no-multi-comp](docs/rules/no-multi-comp.md) | Disallow multiple component definition per file |
-| | | | [react/no-namespace](docs/rules/no-namespace.md) | Enforce that namespaces are not used in React elements |
-| | | | [react/no-redundant-should-component-update](docs/rules/no-redundant-should-component-update.md) | Disallow usage of shouldComponentUpdate when extending React.PureComponent |
-| ✔ | | | [react/no-render-return-value](docs/rules/no-render-return-value.md) | Disallow usage of the return value of ReactDOM.render |
-| | | | [react/no-set-state](docs/rules/no-set-state.md) | Disallow usage of setState |
-| ✔ | | | [react/no-string-refs](docs/rules/no-string-refs.md) | Disallow using string references |
-| | | | [react/no-this-in-sfc](docs/rules/no-this-in-sfc.md) | Disallow `this` from being used in stateless functional components |
-| | | | [react/no-typos](docs/rules/no-typos.md) | Disallow common typos |
-| ✔ | | | [react/no-unescaped-entities](docs/rules/no-unescaped-entities.md) | Disallow unescaped HTML entities from appearing in markup |
-| ✔ | 🔧 | | [react/no-unknown-property](docs/rules/no-unknown-property.md) | Disallow usage of unknown DOM property |
-| | | | [react/no-unsafe](docs/rules/no-unsafe.md) | Disallow usage of unsafe lifecycle methods |
-| | | | [react/no-unstable-nested-components](docs/rules/no-unstable-nested-components.md) | Disallow creating unstable components inside components |
-| | | | [react/no-unused-class-component-methods](docs/rules/no-unused-class-component-methods.md) | Disallow declaring unused methods of component class |
-| | | | [react/no-unused-prop-types](docs/rules/no-unused-prop-types.md) | Disallow definitions of unused propTypes |
-| | | | [react/no-unused-state](docs/rules/no-unused-state.md) | Disallow definitions of unused state |
-| | | | [react/no-will-update-set-state](docs/rules/no-will-update-set-state.md) | Disallow usage of setState in componentWillUpdate |
-| | | | [react/prefer-es6-class](docs/rules/prefer-es6-class.md) | Enforce ES5 or ES6 class for React Components |
-| | | | [react/prefer-exact-props](docs/rules/prefer-exact-props.md) | Prefer exact proptype definitions |
-| | 🔧 | | [react/prefer-read-only-props](docs/rules/prefer-read-only-props.md) | Enforce that props are read-only |
-| | | | [react/prefer-stateless-function](docs/rules/prefer-stateless-function.md) | Enforce stateless components to be written as a pure function |
-| ✔ | | | [react/prop-types](docs/rules/prop-types.md) | Disallow missing props validation in a React component definition |
-| ✔ | | | [react/react-in-jsx-scope](docs/rules/react-in-jsx-scope.md) | Disallow missing React when using JSX |
-| | | | [react/require-default-props](docs/rules/require-default-props.md) | Enforce a defaultProps definition for every prop that is not a required prop |
-| | | | [react/require-optimization](docs/rules/require-optimization.md) | Enforce React components to have a shouldComponentUpdate method |
-| ✔ | | | [react/require-render-return](docs/rules/require-render-return.md) | Enforce ES5 or ES6 class for returning value in render function |
-| | 🔧 | | [react/self-closing-comp](docs/rules/self-closing-comp.md) | Disallow extra closing tags for components without children |
-| | | | [react/sort-comp](docs/rules/sort-comp.md) | Enforce component methods order |
-| | | | [react/sort-prop-types](docs/rules/sort-prop-types.md) | Enforce propTypes declarations alphabetical sorting |
-| | | | [react/state-in-constructor](docs/rules/state-in-constructor.md) | Enforce class component state initialization style |
-| | | | [react/static-property-placement](docs/rules/static-property-placement.md) | Enforces where React component static properties should be positioned. |
-| | | | [react/style-prop-object](docs/rules/style-prop-object.md) | Enforce style prop value is an object |
-| | | | [react/void-dom-elements-no-children](docs/rules/void-dom-elements-no-children.md) | Disallow void DOM elements (e.g. ``, `
`) from receiving children |
-
-
-### JSX-specific rules
-
-
-| ✔ | 🔧 | 💡 | Rule | Description |
-| :---: | :---: | :---: | :--- | :--- |
-| | 🔧 | | [react/jsx-boolean-value](docs/rules/jsx-boolean-value.md) | Enforce boolean attributes notation in JSX |
-| | | | [react/jsx-child-element-spacing](docs/rules/jsx-child-element-spacing.md) | Enforce or disallow spaces inside of curly braces in JSX attributes and expressions |
-| | 🔧 | | [react/jsx-closing-bracket-location](docs/rules/jsx-closing-bracket-location.md) | Enforce closing bracket location in JSX |
-| | 🔧 | | [react/jsx-closing-tag-location](docs/rules/jsx-closing-tag-location.md) | Enforce closing tag location for multiline JSX |
-| | 🔧 | | [react/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 |
-| | 🔧 | | [react/jsx-curly-newline](docs/rules/jsx-curly-newline.md) | Enforce consistent linebreaks in curly braces in JSX attributes and expressions |
-| | 🔧 | | [react/jsx-curly-spacing](docs/rules/jsx-curly-spacing.md) | Enforce or disallow spaces inside of curly braces in JSX attributes and expressions |
-| | 🔧 | | [react/jsx-equals-spacing](docs/rules/jsx-equals-spacing.md) | Enforce or disallow spaces around equal signs in JSX attributes |
-| | | | [react/jsx-filename-extension](docs/rules/jsx-filename-extension.md) | Disallow file extensions that may contain JSX |
-| | 🔧 | | [react/jsx-first-prop-new-line](docs/rules/jsx-first-prop-new-line.md) | Enforce proper position of the first property in JSX |
-| | 🔧 | | [react/jsx-fragments](docs/rules/jsx-fragments.md) | Enforce shorthand or standard form for React fragments |
-| | | | [react/jsx-handler-names](docs/rules/jsx-handler-names.md) | Enforce event handler naming conventions in JSX |
-| | 🔧 | | [react/jsx-indent](docs/rules/jsx-indent.md) | Enforce JSX indentation |
-| | 🔧 | | [react/jsx-indent-props](docs/rules/jsx-indent-props.md) | Enforce props indentation in JSX |
-| ✔ | | | [react/jsx-key](docs/rules/jsx-key.md) | Disallow missing `key` props in iterators/collection literals |
-| | | | [react/jsx-max-depth](docs/rules/jsx-max-depth.md) | Enforce JSX maximum depth |
-| | 🔧 | | [react/jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md) | Enforce maximum of props on a single line in JSX |
-| | 🔧 | | [react/jsx-newline](docs/rules/jsx-newline.md) | Require or prevent a new line after jsx elements and expressions. |
-| | | | [react/jsx-no-bind](docs/rules/jsx-no-bind.md) | Disallow `.bind()` or arrow functions in JSX props |
-| ✔ | | | [react/jsx-no-comment-textnodes](docs/rules/jsx-no-comment-textnodes.md) | Disallow comments from being inserted as text nodes |
-| | | | [react/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 |
-| ✔ | | | [react/jsx-no-duplicate-props](docs/rules/jsx-no-duplicate-props.md) | Disallow duplicate properties in JSX |
-| | 🔧 | | [react/jsx-no-leaked-render](docs/rules/jsx-no-leaked-render.md) | Disallow problematic leaked values from being rendered |
-| | | | [react/jsx-no-literals](docs/rules/jsx-no-literals.md) | Disallow usage of string literals in JSX |
-| | | | [react/jsx-no-script-url](docs/rules/jsx-no-script-url.md) | Disallow usage of `javascript:` URLs |
-| ✔ | 🔧 | | [react/jsx-no-target-blank](docs/rules/jsx-no-target-blank.md) | Disallow `target="_blank"` attribute without `rel="noreferrer"` |
-| ✔ | | | [react/jsx-no-undef](docs/rules/jsx-no-undef.md) | Disallow undeclared variables in JSX |
-| | 🔧 | | [react/jsx-no-useless-fragment](docs/rules/jsx-no-useless-fragment.md) | Disallow unnecessary fragments |
-| | 🔧 | | [react/jsx-one-expression-per-line](docs/rules/jsx-one-expression-per-line.md) | Require one JSX element per line |
-| | | | [react/jsx-pascal-case](docs/rules/jsx-pascal-case.md) | Enforce PascalCase for user-defined JSX components |
-| | 🔧 | | [react/jsx-props-no-multi-spaces](docs/rules/jsx-props-no-multi-spaces.md) | Disallow multiple spaces between inline JSX props |
-| | | | [react/jsx-props-no-spreading](docs/rules/jsx-props-no-spreading.md) | Disallow JSX prop spreading |
-| | | | [react/jsx-sort-default-props](docs/rules/jsx-sort-default-props.md) | Enforce defaultProps declarations alphabetical sorting |
-| | 🔧 | | [react/jsx-sort-props](docs/rules/jsx-sort-props.md) | Enforce props alphabetical sorting |
-| | 🔧 | | [react/jsx-space-before-closing](docs/rules/jsx-space-before-closing.md) | Enforce spacing before closing bracket in JSX. ❌ This rule is deprecated. |
-| | 🔧 | | [react/jsx-tag-spacing](docs/rules/jsx-tag-spacing.md) | Enforce whitespace in and around the JSX opening and closing brackets |
-| ✔ | | | [react/jsx-uses-react](docs/rules/jsx-uses-react.md) | Disallow React to be incorrectly marked as unused |
-| ✔ | | | [react/jsx-uses-vars](docs/rules/jsx-uses-vars.md) | Disallow variables used in JSX to be incorrectly marked as unused |
-| | 🔧 | | [react/jsx-wrap-multilines](docs/rules/jsx-wrap-multilines.md) | Disallow missing parentheses around multiline JSX |
-
+
+
+💼 Enabled in the `recommended` [configuration](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs).\
+🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
+💡 Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\
+❌ Deprecated.
+
+| Name | Description | 💼 | 🔧 | 💡 | ❌ |
+| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------- | :- | :- | :- | :- |
+| [boolean-prop-naming](docs/rules/boolean-prop-naming.md) | Enforces consistent naming for boolean props | | | | |
+| [button-has-type](docs/rules/button-has-type.md) | Disallow usage of `button` elements without an explicit `type` attribute | | | | |
+| [default-props-match-prop-types](docs/rules/default-props-match-prop-types.md) | Enforce all defaultProps have a corresponding non-required PropType | | | | |
+| [destructuring-assignment](docs/rules/destructuring-assignment.md) | Enforce consistent usage of destructuring assignment of props, state, and context | | 🔧 | | |
+| [display-name](docs/rules/display-name.md) | Disallow missing displayName in a React component definition | 💼 | | | |
+| [forbid-component-props](docs/rules/forbid-component-props.md) | Disallow certain props on components | | | | |
+| [forbid-dom-props](docs/rules/forbid-dom-props.md) | Disallow certain props on DOM Nodes | | | | |
+| [forbid-elements](docs/rules/forbid-elements.md) | Disallow certain elements | | | | |
+| [forbid-foreign-prop-types](docs/rules/forbid-foreign-prop-types.md) | Disallow using another component's propTypes | | | | |
+| [forbid-prop-types](docs/rules/forbid-prop-types.md) | Disallow certain propTypes | | | | |
+| [function-component-definition](docs/rules/function-component-definition.md) | Enforce a specific function type for function components | | 🔧 | | |
+| [hook-use-state](docs/rules/hook-use-state.md) | Ensure destructuring and symmetric naming of useState hook value and setter variables | | | 💡 | |
+| [iframe-missing-sandbox](docs/rules/iframe-missing-sandbox.md) | Enforce sandbox attribute on iframe elements | | | | |
+| [jsx-boolean-value](docs/rules/jsx-boolean-value.md) | Enforce boolean attributes notation in JSX | | 🔧 | | |
+| [jsx-child-element-spacing](docs/rules/jsx-child-element-spacing.md) | Enforce or disallow spaces inside of curly braces in JSX attributes and expressions | | | | |
+| [jsx-closing-bracket-location](docs/rules/jsx-closing-bracket-location.md) | Enforce closing bracket location in JSX | | 🔧 | | |
+| [jsx-closing-tag-location](docs/rules/jsx-closing-tag-location.md) | Enforce closing tag location for multiline JSX | | 🔧 | | |
+| [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 | | 🔧 | | |
+| [jsx-curly-newline](docs/rules/jsx-curly-newline.md) | Enforce consistent linebreaks in curly braces in JSX attributes and expressions | | 🔧 | | |
+| [jsx-curly-spacing](docs/rules/jsx-curly-spacing.md) | Enforce or disallow spaces inside of curly braces in JSX attributes and expressions | | 🔧 | | |
+| [jsx-equals-spacing](docs/rules/jsx-equals-spacing.md) | Enforce or disallow spaces around equal signs in JSX attributes | | 🔧 | | |
+| [jsx-filename-extension](docs/rules/jsx-filename-extension.md) | Disallow file extensions that may contain JSX | | | | |
+| [jsx-first-prop-new-line](docs/rules/jsx-first-prop-new-line.md) | Enforce proper position of the first property in JSX | | 🔧 | | |
+| [jsx-fragments](docs/rules/jsx-fragments.md) | Enforce shorthand or standard form for React fragments | | 🔧 | | |
+| [jsx-handler-names](docs/rules/jsx-handler-names.md) | Enforce event handler naming conventions in JSX | | | | |
+| [jsx-indent](docs/rules/jsx-indent.md) | Enforce JSX indentation | | 🔧 | | |
+| [jsx-indent-props](docs/rules/jsx-indent-props.md) | Enforce props indentation in JSX | | 🔧 | | |
+| [jsx-key](docs/rules/jsx-key.md) | Disallow missing `key` props in iterators/collection literals | 💼 | | | |
+| [jsx-max-depth](docs/rules/jsx-max-depth.md) | Enforce JSX maximum depth | | | | |
+| [jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md) | Enforce maximum of props on a single line in JSX | | 🔧 | | |
+| [jsx-newline](docs/rules/jsx-newline.md) | Require or prevent a new line after jsx elements and expressions. | | 🔧 | | |
+| [jsx-no-bind](docs/rules/jsx-no-bind.md) | Disallow `.bind()` or arrow functions in JSX props | | | | |
+| [jsx-no-comment-textnodes](docs/rules/jsx-no-comment-textnodes.md) | Disallow comments from being inserted as text nodes | 💼 | | | |
+| [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 | | | | |
+| [jsx-no-duplicate-props](docs/rules/jsx-no-duplicate-props.md) | Disallow duplicate properties in JSX | 💼 | | | |
+| [jsx-no-leaked-render](docs/rules/jsx-no-leaked-render.md) | Disallow problematic leaked values from being rendered | | 🔧 | | |
+| [jsx-no-literals](docs/rules/jsx-no-literals.md) | Disallow usage of string literals in JSX | | | | |
+| [jsx-no-script-url](docs/rules/jsx-no-script-url.md) | Disallow usage of `javascript:` URLs | | | | |
+| [jsx-no-target-blank](docs/rules/jsx-no-target-blank.md) | Disallow `target="_blank"` attribute without `rel="noreferrer"` | 💼 | 🔧 | | |
+| [jsx-no-undef](docs/rules/jsx-no-undef.md) | Disallow undeclared variables in JSX | 💼 | | | |
+| [jsx-no-useless-fragment](docs/rules/jsx-no-useless-fragment.md) | Disallow unnecessary fragments | | 🔧 | | |
+| [jsx-one-expression-per-line](docs/rules/jsx-one-expression-per-line.md) | Require one JSX element per line | | 🔧 | | |
+| [jsx-pascal-case](docs/rules/jsx-pascal-case.md) | Enforce PascalCase for user-defined JSX components | | | | |
+| [jsx-props-no-multi-spaces](docs/rules/jsx-props-no-multi-spaces.md) | Disallow multiple spaces between inline JSX props | | 🔧 | | |
+| [jsx-props-no-spreading](docs/rules/jsx-props-no-spreading.md) | Disallow JSX prop spreading | | | | |
+| [jsx-sort-default-props](docs/rules/jsx-sort-default-props.md) | Enforce defaultProps declarations alphabetical sorting | | | | |
+| [jsx-sort-props](docs/rules/jsx-sort-props.md) | Enforce props alphabetical sorting | | 🔧 | | |
+| [jsx-space-before-closing](docs/rules/jsx-space-before-closing.md) | Enforce spacing before closing bracket in JSX | | 🔧 | | ❌ |
+| [jsx-tag-spacing](docs/rules/jsx-tag-spacing.md) | Enforce whitespace in and around the JSX opening and closing brackets | | 🔧 | | |
+| [jsx-uses-react](docs/rules/jsx-uses-react.md) | Disallow React to be incorrectly marked as unused | 💼 | | | |
+| [jsx-uses-vars](docs/rules/jsx-uses-vars.md) | Disallow variables used in JSX to be incorrectly marked as unused | 💼 | | | |
+| [jsx-wrap-multilines](docs/rules/jsx-wrap-multilines.md) | Disallow missing parentheses around multiline JSX | | 🔧 | | |
+| [no-access-state-in-setstate](docs/rules/no-access-state-in-setstate.md) | Disallow when this.state is accessed within setState | | | | |
+| [no-adjacent-inline-elements](docs/rules/no-adjacent-inline-elements.md) | Disallow adjacent inline elements not separated by whitespace. | | | | |
+| [no-array-index-key](docs/rules/no-array-index-key.md) | Disallow usage of Array index in keys | | | | |
+| [no-arrow-function-lifecycle](docs/rules/no-arrow-function-lifecycle.md) | Lifecycle methods should be methods on the prototype, not class fields | | 🔧 | | |
+| [no-children-prop](docs/rules/no-children-prop.md) | Disallow passing of children as props | 💼 | | | |
+| [no-danger](docs/rules/no-danger.md) | Disallow usage of dangerous JSX properties | | | | |
+| [no-danger-with-children](docs/rules/no-danger-with-children.md) | Disallow when a DOM element is using both children and dangerouslySetInnerHTML | 💼 | | | |
+| [no-deprecated](docs/rules/no-deprecated.md) | Disallow usage of deprecated methods | 💼 | | | |
+| [no-did-mount-set-state](docs/rules/no-did-mount-set-state.md) | Disallow usage of setState in componentDidMount | | | | |
+| [no-did-update-set-state](docs/rules/no-did-update-set-state.md) | Disallow usage of setState in componentDidUpdate | | | | |
+| [no-direct-mutation-state](docs/rules/no-direct-mutation-state.md) | Disallow direct mutation of this.state | 💼 | | | |
+| [no-find-dom-node](docs/rules/no-find-dom-node.md) | Disallow usage of findDOMNode | 💼 | | | |
+| [no-invalid-html-attribute](docs/rules/no-invalid-html-attribute.md) | Disallow usage of invalid attributes | | 🔧 | | |
+| [no-is-mounted](docs/rules/no-is-mounted.md) | Disallow usage of isMounted | 💼 | | | |
+| [no-multi-comp](docs/rules/no-multi-comp.md) | Disallow multiple component definition per file | | | | |
+| [no-namespace](docs/rules/no-namespace.md) | Enforce that namespaces are not used in React elements | | | | |
+| [no-redundant-should-component-update](docs/rules/no-redundant-should-component-update.md) | Disallow usage of shouldComponentUpdate when extending React.PureComponent | | | | |
+| [no-render-return-value](docs/rules/no-render-return-value.md) | Disallow usage of the return value of ReactDOM.render | 💼 | | | |
+| [no-set-state](docs/rules/no-set-state.md) | Disallow usage of setState | | | | |
+| [no-string-refs](docs/rules/no-string-refs.md) | Disallow using string references | 💼 | | | |
+| [no-this-in-sfc](docs/rules/no-this-in-sfc.md) | Disallow `this` from being used in stateless functional components | | | | |
+| [no-typos](docs/rules/no-typos.md) | Disallow common typos | | | | |
+| [no-unescaped-entities](docs/rules/no-unescaped-entities.md) | Disallow unescaped HTML entities from appearing in markup | 💼 | | | |
+| [no-unknown-property](docs/rules/no-unknown-property.md) | Disallow usage of unknown DOM property | 💼 | 🔧 | | |
+| [no-unsafe](docs/rules/no-unsafe.md) | Disallow usage of unsafe lifecycle methods | | | | |
+| [no-unstable-nested-components](docs/rules/no-unstable-nested-components.md) | Disallow creating unstable components inside components | | | | |
+| [no-unused-class-component-methods](docs/rules/no-unused-class-component-methods.md) | Disallow declaring unused methods of component class | | | | |
+| [no-unused-prop-types](docs/rules/no-unused-prop-types.md) | Disallow definitions of unused propTypes | | | | |
+| [no-unused-state](docs/rules/no-unused-state.md) | Disallow definitions of unused state | | | | |
+| [no-will-update-set-state](docs/rules/no-will-update-set-state.md) | Disallow usage of setState in componentWillUpdate | | | | |
+| [prefer-es6-class](docs/rules/prefer-es6-class.md) | Enforce ES5 or ES6 class for React Components | | | | |
+| [prefer-exact-props](docs/rules/prefer-exact-props.md) | Prefer exact proptype definitions | | | | |
+| [prefer-read-only-props](docs/rules/prefer-read-only-props.md) | Enforce that props are read-only | | 🔧 | | |
+| [prefer-stateless-function](docs/rules/prefer-stateless-function.md) | Enforce stateless components to be written as a pure function | | | | |
+| [prop-types](docs/rules/prop-types.md) | Disallow missing props validation in a React component definition | 💼 | | | |
+| [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md) | Disallow missing React when using JSX | 💼 | | | |
+| [require-default-props](docs/rules/require-default-props.md) | Enforce a defaultProps definition for every prop that is not a required prop | | | | |
+| [require-optimization](docs/rules/require-optimization.md) | Enforce React components to have a shouldComponentUpdate method | | | | |
+| [require-render-return](docs/rules/require-render-return.md) | Enforce ES5 or ES6 class for returning value in render function | 💼 | | | |
+| [self-closing-comp](docs/rules/self-closing-comp.md) | Disallow extra closing tags for components without children | | 🔧 | | |
+| [sort-comp](docs/rules/sort-comp.md) | Enforce component methods order | | | | |
+| [sort-prop-types](docs/rules/sort-prop-types.md) | Enforce propTypes declarations alphabetical sorting | | | | |
+| [state-in-constructor](docs/rules/state-in-constructor.md) | Enforce class component state initialization style | | | | |
+| [static-property-placement](docs/rules/static-property-placement.md) | Enforces where React component static properties should be positioned. | | | | |
+| [style-prop-object](docs/rules/style-prop-object.md) | Enforce style prop value is an object | | | | |
+| [void-dom-elements-no-children](docs/rules/void-dom-elements-no-children.md) | Disallow void DOM elements (e.g. ``, `
`) from receiving children | | | | |
+
+
### Other useful plugins
diff --git a/docs/rules/boolean-prop-naming.md b/docs/rules/boolean-prop-naming.md
index 61a8fd3a03..1a88c70b2f 100644
--- a/docs/rules/boolean-prop-naming.md
+++ b/docs/rules/boolean-prop-naming.md
@@ -1,6 +1,6 @@
-# Enforces consistent naming for boolean props (react/boolean-prop-naming)
+# Enforces consistent naming for boolean props (`react/boolean-prop-naming`)
-💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
+
Allows you to enforce a consistent naming pattern for props which expect a boolean value.
diff --git a/docs/rules/button-has-type.md b/docs/rules/button-has-type.md
index 88f988fc2c..8bd8b6a85b 100644
--- a/docs/rules/button-has-type.md
+++ b/docs/rules/button-has-type.md
@@ -1,6 +1,6 @@
-# Disallow usage of `button` elements without an explicit `type` attribute (react/button-has-type)
+# Disallow usage of `button` elements without an explicit `type` attribute (`react/button-has-type`)
-💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
+
The default value of `type` attribute for `button` HTML element is `"submit"` which is often not the desired behavior and may lead to unexpected page reloads.
This rules enforces an explicit `type` attribute for all the `button` elements and checks that its value is valid per spec (i.e., is one of `"button"`, `"submit"`, and `"reset"`).
diff --git a/docs/rules/default-props-match-prop-types.md b/docs/rules/default-props-match-prop-types.md
index a754cfb07c..f5641c44aa 100644
--- a/docs/rules/default-props-match-prop-types.md
+++ b/docs/rules/default-props-match-prop-types.md
@@ -1,6 +1,6 @@
-# Enforce all defaultProps have a corresponding non-required PropType (react/default-props-match-prop-types)
+# Enforce all defaultProps have a corresponding non-required PropType (`react/default-props-match-prop-types`)
-💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
+
This rule aims to ensure that any prop in `defaultProps` has a non-required type
definition.
diff --git a/docs/rules/destructuring-assignment.md b/docs/rules/destructuring-assignment.md
index 6592bb966a..0f8ed6ee4c 100644
--- a/docs/rules/destructuring-assignment.md
+++ b/docs/rules/destructuring-assignment.md
@@ -1,8 +1,8 @@
-# Enforce consistent usage of destructuring assignment of props, state, and context (react/destructuring-assignment)
+# Enforce consistent usage of destructuring assignment of props, state, and context (`react/destructuring-assignment`)
-💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
+🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-🔧 This rule is automatically fixable using the `--fix` [flag](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) on the command line.
+
Rule can be set to either of `always` or `never`;
diff --git a/docs/rules/display-name.md b/docs/rules/display-name.md
index c37f42f763..6d0b57a092 100644
--- a/docs/rules/display-name.md
+++ b/docs/rules/display-name.md
@@ -1,6 +1,8 @@
-# Disallow missing displayName in a React component definition (react/display-name)
+# Disallow missing displayName in a React component definition (`react/display-name`)
-💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`, `recommended`.
+💼 This rule is enabled in the `recommended` [config](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs).
+
+
DisplayName allows you to name your component. This name is used by React in debugging messages.
diff --git a/docs/rules/forbid-component-props.md b/docs/rules/forbid-component-props.md
index f85e8866fd..ddcfc12eb7 100644
--- a/docs/rules/forbid-component-props.md
+++ b/docs/rules/forbid-component-props.md
@@ -1,6 +1,6 @@
-# Disallow certain props on components (react/forbid-component-props)
+# Disallow certain props on components (`react/forbid-component-props`)
-💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
+
By default this rule prevents passing of [props that add lots of complexity](https://medium.com/brigade-engineering/don-t-pass-css-classes-between-components-e9f7ab192785) (`className`, `style`) to Components. This rule only applies to Components (e.g. `