Skip to content

Commit

Permalink
[Docs]: Recategorize rules in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot committed Feb 28, 2022
1 parent e972bd7 commit a189556
Show file tree
Hide file tree
Showing 97 changed files with 174 additions and 149 deletions.
83 changes: 46 additions & 37 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/rules/boolean-prop-naming.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const messages = {
module.exports = {
meta: {
docs: {
category: 'Stylistic Issues',
category: 'suggestion',
description: 'Enforces consistent naming for boolean props',
recommended: false,
url: docsUrl('boolean-prop-naming'),
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/button-has-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
meta: {
docs: {
description: 'Forbid "button" element without an explicit "type" attribute',
category: 'Possible Errors',
category: 'suggestion',
recommended: false,
url: docsUrl('button-has-type'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/default-props-match-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce all defaultProps are defined and not "required" in propTypes.',
category: 'Best Practices',
category: 'suggestion',
url: docsUrl('default-props-match-prop-types'),
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/destructuring-assignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce consistent usage of destructuring assignment of props, state, and context',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('destructuring-assignment'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/display-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
meta: {
docs: {
description: 'Prevent missing displayName in a React component definition',
category: 'Best Practices',
category: 'suggestion',
recommended: true,
url: docsUrl('display-name'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/forbid-component-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
meta: {
docs: {
description: 'Forbid certain props on components',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('forbid-component-props'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/forbid-dom-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
meta: {
docs: {
description: 'Forbid certain props on DOM Nodes',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('forbid-dom-props'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/forbid-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
meta: {
docs: {
description: 'Forbid certain elements',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('forbid-elements'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/forbid-foreign-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
meta: {
docs: {
description: 'Forbid using another component\'s propTypes',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('forbid-foreign-prop-types'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/forbid-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
meta: {
docs: {
description: 'Forbid certain propTypes',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('forbid-prop-types'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/function-component-definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = {
meta: {
docs: {
description: 'Standardize the way function component get defined',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('function-component-definition'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/hook-use-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
docs: {
description: 'Ensure symmetric naming of useState hook value and setter variables',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('hook-use-state'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/iframe-missing-sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce sandbox attribute on iframe elements',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('iframe-missing-sandbox'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-boolean-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce boolean attributes notation in JSX',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-boolean-value'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-child-element-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
meta: {
docs: {
description: 'Ensures inline tags are not rendered without spaces between them',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-child-element-spacing'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-closing-bracket-location.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
docs: {
description: 'Validate closing bracket location in JSX',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-closing-bracket-location'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-closing-tag-location.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
meta: {
docs: {
description: 'Validate closing tag location for multiline JSX',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-closing-tag-location'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-curly-brace-presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
meta: {
docs: {
description: 'Disallow unnecessary JSX expressions when literals alone are sufficient or enfore JSX expressions on literals in JSX children or attributes',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-curly-brace-presence'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-curly-newline.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = {

docs: {
description: 'Enforce consistent line breaks inside jsx curly',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-curly-newline'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-curly-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce or disallow spaces inside of curly braces in JSX attributes',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-curly-spacing'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-equals-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
meta: {
docs: {
description: 'Disallow or enforce spaces around equal signs in JSX attributes',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-equals-spacing'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-filename-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
meta: {
docs: {
description: 'Restrict file extensions that may contain JSX',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-filename-extension'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-first-prop-new-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
docs: {
description: 'Ensure proper position of the first property in JSX',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-first-prop-new-line'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-fragments.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce shorthand or standard form for React fragments',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-fragments'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-handler-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce event handler naming conventions in JSX',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-handler-names'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-indent-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
meta: {
docs: {
description: 'Validate props indentation in JSX',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-indent-props'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-indent.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
meta: {
docs: {
description: 'Validate JSX indentation',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-indent'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
meta: {
docs: {
description: 'Report missing `key` props in iterators/collection literals',
category: 'Possible Errors',
category: 'problem',
recommended: true,
url: docsUrl('jsx-key'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-max-depth.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
meta: {
docs: {
description: 'Validate JSX maximum depth',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-max-depth'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-max-props-per-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
meta: {
docs: {
description: 'Limit maximum of props on a single line in JSX',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-max-props-per-line'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-newline.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
meta: {
docs: {
description: 'Require or prevent a new line after jsx elements and expressions.',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-newline'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
meta: {
docs: {
description: 'Prevents usage of Function.prototype.bind and arrow functions in React component props',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-no-bind'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-comment-textnodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
meta: {
docs: {
description: 'Comments inside children section of tag should be placed inside braces',
category: 'Possible Errors',
category: 'problem',
recommended: true,
url: docsUrl('jsx-no-comment-textnodes'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-constructed-context-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ module.exports = {
meta: {
docs: {
description: 'Prevents JSX context provider values from taking values that will cause needless rerenders.',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-no-constructed-context-values'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-duplicate-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce no duplicate props',
category: 'Possible Errors',
category: 'problem',
recommended: true,
url: docsUrl('jsx-no-duplicate-props'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-literals.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
meta: {
docs: {
description: 'Prevent using string literals in React component definition',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-no-literals'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-script-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = {
meta: {
docs: {
description: 'Forbid `javascript:` URLs',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-no-script-url'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-target-blank.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = {
fixable: 'code',
docs: {
description: 'Forbid `target="_blank"` attribute without `rel="noreferrer"`',
category: 'Best Practices',
category: 'suggestion',
recommended: true,
url: docsUrl('jsx-no-target-blank'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-undef.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
docs: {
description: 'Disallow undeclared variables in JSX',
category: 'Possible Errors',
category: 'problem',
recommended: true,
url: docsUrl('jsx-no-undef'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-useless-fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = {
fixable: 'code',
docs: {
description: 'Disallow unnecessary fragments',
category: 'Possible Errors',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-no-useless-fragment'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-one-expression-per-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
meta: {
docs: {
description: 'Limit to one expression per line in JSX',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-one-expression-per-line'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-pascal-case.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module.exports = {
meta: {
docs: {
description: 'Enforce PascalCase for user-defined JSX components',
category: 'Stylistic Issues',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-pascal-case'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-props-no-multi-spaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
docs: {
description: 'Disallow multiple spaces between inline JSX props',
category: 'Stylistic Issues',
category: 'layout',
recommended: false,
url: docsUrl('jsx-props-no-multi-spaces'),
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-props-no-spreading.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = {
meta: {
docs: {
description: 'Prevent JSX prop spreading',
category: 'Best Practices',
category: 'suggestion',
recommended: false,
url: docsUrl('jsx-props-no-spreading'),
},
Expand Down
Loading

0 comments on commit a189556

Please sign in to comment.