From 147df5ff93d4973b52919e5661e0aa575977a96f Mon Sep 17 00:00:00 2001
From: Bryan Mishkin <698306+bmish@users.noreply.github.com>
Date: Fri, 21 Oct 2022 10:05:33 -0400
Subject: [PATCH] docs: update eslint-doc-generator to 0.15
---
README.md | 49 +++++++++----------
docs/rules/boolean-prop-naming.md | 2 +-
docs/rules/button-has-type.md | 2 +-
docs/rules/default-props-match-prop-types.md | 2 +-
docs/rules/destructuring-assignment.md | 2 +-
docs/rules/display-name.md | 4 +-
docs/rules/forbid-component-props.md | 2 +-
docs/rules/forbid-dom-props.md | 2 +-
docs/rules/forbid-elements.md | 2 +-
docs/rules/forbid-foreign-prop-types.md | 2 +-
docs/rules/forbid-prop-types.md | 2 +-
docs/rules/function-component-definition.md | 2 +-
docs/rules/hook-use-state.md | 2 +-
docs/rules/iframe-missing-sandbox.md | 2 +-
docs/rules/jsx-boolean-value.md | 2 +-
docs/rules/jsx-child-element-spacing.md | 2 +-
docs/rules/jsx-closing-bracket-location.md | 2 +-
docs/rules/jsx-closing-tag-location.md | 2 +-
docs/rules/jsx-curly-brace-presence.md | 2 +-
docs/rules/jsx-curly-newline.md | 2 +-
docs/rules/jsx-curly-spacing.md | 2 +-
docs/rules/jsx-equals-spacing.md | 2 +-
docs/rules/jsx-filename-extension.md | 2 +-
docs/rules/jsx-first-prop-new-line.md | 2 +-
docs/rules/jsx-fragments.md | 2 +-
docs/rules/jsx-handler-names.md | 2 +-
docs/rules/jsx-indent-props.md | 2 +-
docs/rules/jsx-indent.md | 2 +-
docs/rules/jsx-key.md | 4 +-
docs/rules/jsx-max-depth.md | 2 +-
docs/rules/jsx-max-props-per-line.md | 2 +-
docs/rules/jsx-newline.md | 2 +-
docs/rules/jsx-no-bind.md | 2 +-
docs/rules/jsx-no-comment-textnodes.md | 4 +-
.../jsx-no-constructed-context-values.md | 2 +-
docs/rules/jsx-no-duplicate-props.md | 4 +-
docs/rules/jsx-no-leaked-render.md | 2 +-
docs/rules/jsx-no-literals.md | 2 +-
docs/rules/jsx-no-script-url.md | 2 +-
docs/rules/jsx-no-target-blank.md | 4 +-
docs/rules/jsx-no-undef.md | 4 +-
docs/rules/jsx-no-useless-fragment.md | 2 +-
docs/rules/jsx-one-expression-per-line.md | 2 +-
docs/rules/jsx-pascal-case.md | 2 +-
docs/rules/jsx-props-no-multi-spaces.md | 2 +-
docs/rules/jsx-props-no-spreading.md | 2 +-
docs/rules/jsx-sort-default-props.md | 4 +-
docs/rules/jsx-sort-props.md | 2 +-
docs/rules/jsx-space-before-closing.md | 4 +-
docs/rules/jsx-tag-spacing.md | 2 +-
docs/rules/jsx-uses-react.md | 4 +-
docs/rules/jsx-uses-vars.md | 4 +-
docs/rules/jsx-wrap-multilines.md | 2 +-
docs/rules/no-access-state-in-setstate.md | 2 +-
docs/rules/no-adjacent-inline-elements.md | 2 +-
docs/rules/no-array-index-key.md | 2 +-
docs/rules/no-arrow-function-lifecycle.md | 2 +-
docs/rules/no-children-prop.md | 4 +-
docs/rules/no-danger-with-children.md | 4 +-
docs/rules/no-danger.md | 2 +-
docs/rules/no-deprecated.md | 4 +-
docs/rules/no-did-mount-set-state.md | 2 +-
docs/rules/no-did-update-set-state.md | 2 +-
docs/rules/no-direct-mutation-state.md | 4 +-
docs/rules/no-find-dom-node.md | 4 +-
docs/rules/no-invalid-html-attribute.md | 2 +-
docs/rules/no-is-mounted.md | 4 +-
docs/rules/no-multi-comp.md | 2 +-
docs/rules/no-namespace.md | 2 +-
docs/rules/no-object-type-as-default-prop.md | 2 +-
.../no-redundant-should-component-update.md | 2 +-
docs/rules/no-render-return-value.md | 4 +-
docs/rules/no-set-state.md | 2 +-
docs/rules/no-string-refs.md | 4 +-
docs/rules/no-this-in-sfc.md | 2 +-
docs/rules/no-typos.md | 2 +-
docs/rules/no-unescaped-entities.md | 4 +-
docs/rules/no-unknown-property.md | 4 +-
docs/rules/no-unsafe.md | 4 +-
docs/rules/no-unstable-nested-components.md | 7 ++-
.../no-unused-class-component-methods.md | 2 +-
docs/rules/no-unused-prop-types.md | 2 +-
docs/rules/no-unused-state.md | 2 +-
docs/rules/no-will-update-set-state.md | 2 +-
docs/rules/prefer-es6-class.md | 2 +-
docs/rules/prefer-exact-props.md | 2 +-
docs/rules/prefer-read-only-props.md | 2 +-
docs/rules/prefer-stateless-function.md | 2 +-
docs/rules/prop-types.md | 4 +-
docs/rules/react-in-jsx-scope.md | 4 +-
docs/rules/require-default-props.md | 2 +-
docs/rules/require-optimization.md | 2 +-
docs/rules/require-render-return.md | 4 +-
docs/rules/self-closing-comp.md | 2 +-
docs/rules/sort-comp.md | 2 +-
docs/rules/sort-default-props.md | 2 +-
docs/rules/sort-prop-types.md | 2 +-
docs/rules/state-in-constructor.md | 2 +-
docs/rules/static-property-placement.md | 2 +-
docs/rules/style-prop-object.md | 2 +-
docs/rules/void-dom-elements-no-children.md | 2 +-
lib/rules/no-unstable-nested-components.js | 6 +++
package.json | 6 +--
103 files changed, 162 insertions(+), 152 deletions(-)
diff --git a/README.md b/README.md
index 85776d198b..cc3d8f3d3e 100644
--- a/README.md
+++ b/README.md
@@ -279,10 +279,9 @@ module.exports = [
## List of supported rules
-
+
-💼 [Configurations](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs) enabled in.\
-✅ Enabled in the `recommended` [configuration](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs).\
+💼 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.
@@ -293,7 +292,7 @@ module.exports = [
| [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 | ✅ | | | |
+| [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 | | | | |
@@ -316,19 +315,19 @@ module.exports = [
| [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-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-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-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-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 | | | | |
@@ -338,34 +337,34 @@ module.exports = [
| [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-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-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-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-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-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-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 | | | | |
| [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-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-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-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 | | | | |
@@ -376,11 +375,11 @@ module.exports = [
| [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 | ✅ | | | |
+| [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 | ✅ | | | |
+| [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-default-props](docs/rules/sort-default-props.md) | Enforce defaultProps declarations alphabetical sorting | | | | |
@@ -390,7 +389,7 @@ module.exports = [
| [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 3da8977248..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`)
-
+
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 d91297aab0..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`)
-
+
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 998f245c00..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`)
-
+
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 487f227964..0f8ed6ee4c 100644
--- a/docs/rules/destructuring-assignment.md
+++ b/docs/rules/destructuring-assignment.md
@@ -2,7 +2,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
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 731b5390fa..6d0b57a092 100644
--- a/docs/rules/display-name.md
+++ b/docs/rules/display-name.md
@@ -1,8 +1,8 @@
# Disallow missing displayName in a React component definition (`react/display-name`)
-✅ This rule is enabled in the `recommended` [config](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs).
+💼 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 d35b5bd8de..a22fb36624 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`)
-
+
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. `