From c9f5eb264e881f7de66188cbb20904fa8edf3985 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Mon, 12 Dec 2022 09:44:51 -0800 Subject: [PATCH] [Docs] Use emoji for jsx-runtime config and config file for eslint-doc-generator --- .eslint-doc-generatorrc.js | 11 ++ CHANGELOG.md | 2 + README.md | 207 +++++++++++++++---------------- docs/rules/jsx-uses-react.md | 2 +- docs/rules/react-in-jsx-scope.md | 2 +- package.json | 3 +- 6 files changed, 120 insertions(+), 107 deletions(-) create mode 100644 .eslint-doc-generatorrc.js diff --git a/.eslint-doc-generatorrc.js b/.eslint-doc-generatorrc.js new file mode 100644 index 0000000000..1e6d1717f3 --- /dev/null +++ b/.eslint-doc-generatorrc.js @@ -0,0 +1,11 @@ +/** @type {import('eslint-doc-generator').GenerateOptions} */ +const config = { + configEmoji: [ + ['jsx-runtime', 'πŸƒ'], + ['recommended', 'β˜‘οΈ'], + ], + ignoreConfig: ['all'], + urlConfigs: 'https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs', +}; + +module.exports = config; diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e1b2ae752..3bf878aaa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [Docs] [`jsx-no-leaked-render`]: Remove mentions of empty strings for React 18 ([#3468][] @karlhorky) * [Docs] update `eslint-doc-generator` to v1.0.0 ([#3499][] @bmish) * [meta] add issue template ([#3483][] @ROSSROSALES) +* [Docs] Use emoji for jsx-runtime config and config file for eslint-doc-generator ([#3504][] @bmish)[ +[#3504]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3504 [#3499]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3499 [#3494]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3494 [#3493]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3493 diff --git a/README.md b/README.md index f1c4b65fde..286762bbd3 100644 --- a/README.md +++ b/README.md @@ -283,113 +283,114 @@ module.exports = [ πŸ’Ό [Configurations](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs) enabled in.\ 🚫 [Configurations](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs) disabled in.\ +πŸƒ Set in the `jsx-runtime` [configuration](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs).\ β˜‘οΈ Set 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 | β˜‘οΈ | ![badge-jsx-runtime][] | | | | -| [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-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-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 | β˜‘οΈ | ![badge-jsx-runtime][] | | | | -| [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-default-props](docs/rules/sort-default-props.md) | Enforce defaultProps declarations alphabetical sorting | | | | | | -| [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 | | | | | | +| 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-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-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-default-props](docs/rules/sort-default-props.md) | Enforce defaultProps declarations alphabetical sorting | | | | | | +| [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 | | | | | | @@ -417,5 +418,3 @@ module.exports = [ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/jsx-eslint/eslint-plugin-react [actions-url]: https://github.com/jsx-eslint/eslint-plugin-react/actions - -[badge-jsx-runtime]: https://img.shields.io/badge/-jsx--runtime-blue.svg diff --git a/docs/rules/jsx-uses-react.md b/docs/rules/jsx-uses-react.md index 6dcaa7bc5b..43e3fa4711 100644 --- a/docs/rules/jsx-uses-react.md +++ b/docs/rules/jsx-uses-react.md @@ -1,6 +1,6 @@ # Disallow React to be incorrectly marked as unused (`react/jsx-uses-react`) -πŸ’ΌπŸš« This rule is enabled in the β˜‘οΈ `recommended` [config](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs). This rule is _disabled_ in the `jsx-runtime` [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). This rule is _disabled_ in the πŸƒ `jsx-runtime` [config](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs). diff --git a/docs/rules/react-in-jsx-scope.md b/docs/rules/react-in-jsx-scope.md index 0b187a8bb5..14fcf06a73 100644 --- a/docs/rules/react-in-jsx-scope.md +++ b/docs/rules/react-in-jsx-scope.md @@ -1,6 +1,6 @@ # Disallow missing React when using JSX (`react/react-in-jsx-scope`) -πŸ’ΌπŸš« This rule is enabled in the β˜‘οΈ `recommended` [config](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs). This rule is _disabled_ in the `jsx-runtime` [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). This rule is _disabled_ in the πŸƒ `jsx-runtime` [config](https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs). diff --git a/package.json b/package.json index 48f3d29db8..94fb5b229a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "posttest": "aud --production", "type-check": "tsc", "unit-test": "istanbul cover node_modules/mocha/bin/_mocha tests/lib/**/*.js tests/util/**/*.js tests/index.js", - "update:eslint-docs": "eslint-doc-generator --ignore-config all --config-emoji recommended,β˜‘οΈ --url-configs \"https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs\"" + "update:eslint-docs": "eslint-doc-generator" }, "repository": { "type": "git", @@ -94,6 +94,7 @@ "tests/", "*.md", "*.config.js", + ".eslint-doc-generatorrc.js", ".eslintrc", ".editorconfig", "tsconfig.json",