Skip to content

Commit 75af0b1

Browse files
committed
[Docs]: Recategorize rules in readme
1 parent 9090999 commit 75af0b1

File tree

97 files changed

+174
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+174
-149
lines changed

README.md

+46-37

lib/rules/boolean-prop-naming.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const messages = {
2222
module.exports = {
2323
meta: {
2424
docs: {
25-
category: 'Stylistic Issues',
25+
category: 'suggestion',
2626
description: 'Enforces consistent naming for boolean props',
2727
recommended: false,
2828
url: docsUrl('boolean-prop-naming'),

lib/rules/button-has-type.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
meta: {
3333
docs: {
3434
description: 'Forbid "button" element without an explicit "type" attribute',
35-
category: 'Possible Errors',
35+
category: 'suggestion',
3636
recommended: false,
3737
url: docsUrl('button-has-type'),
3838
},

lib/rules/default-props-match-prop-types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
meta: {
2424
docs: {
2525
description: 'Enforce all defaultProps are defined and not "required" in propTypes.',
26-
category: 'Best Practices',
26+
category: 'suggestion',
2727
url: docsUrl('default-props-match-prop-types'),
2828
},
2929

lib/rules/destructuring-assignment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = {
5656
meta: {
5757
docs: {
5858
description: 'Enforce consistent usage of destructuring assignment of props, state, and context',
59-
category: 'Stylistic Issues',
59+
category: 'suggestion',
6060
recommended: false,
6161
url: docsUrl('destructuring-assignment'),
6262
},

lib/rules/display-name.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
meta: {
2626
docs: {
2727
description: 'Prevent missing displayName in a React component definition',
28-
category: 'Best Practices',
28+
category: 'suggestion',
2929
recommended: true,
3030
url: docsUrl('display-name'),
3131
},

lib/rules/forbid-component-props.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = {
2626
meta: {
2727
docs: {
2828
description: 'Forbid certain props on components',
29-
category: 'Best Practices',
29+
category: 'suggestion',
3030
recommended: false,
3131
url: docsUrl('forbid-component-props'),
3232
},

lib/rules/forbid-dom-props.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = {
2626
meta: {
2727
docs: {
2828
description: 'Forbid certain props on DOM Nodes',
29-
category: 'Best Practices',
29+
category: 'suggestion',
3030
recommended: false,
3131
url: docsUrl('forbid-dom-props'),
3232
},

lib/rules/forbid-elements.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
meta: {
2424
docs: {
2525
description: 'Forbid certain elements',
26-
category: 'Best Practices',
26+
category: 'suggestion',
2727
recommended: false,
2828
url: docsUrl('forbid-elements'),
2929
},

lib/rules/forbid-foreign-prop-types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
meta: {
1818
docs: {
1919
description: 'Forbid using another component\'s propTypes',
20-
category: 'Best Practices',
20+
category: 'suggestion',
2121
recommended: false,
2222
url: docsUrl('forbid-foreign-prop-types'),
2323
},

lib/rules/forbid-prop-types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929
meta: {
3030
docs: {
3131
description: 'Forbid certain propTypes',
32-
category: 'Best Practices',
32+
category: 'suggestion',
3333
recommended: false,
3434
url: docsUrl('forbid-prop-types'),
3535
},

lib/rules/function-component-definition.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ module.exports = {
102102
meta: {
103103
docs: {
104104
description: 'Standardize the way function component get defined',
105-
category: 'Stylistic Issues',
105+
category: 'suggestion',
106106
recommended: false,
107107
url: docsUrl('function-component-definition'),
108108
},

lib/rules/hook-use-state.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'Ensure symmetric naming of useState hook value and setter variables',
24-
category: 'Best Practices',
24+
category: 'suggestion',
2525
recommended: false,
2626
url: docsUrl('hook-use-state'),
2727
},

lib/rules/iframe-missing-sandbox.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ module.exports = {
113113
meta: {
114114
docs: {
115115
description: 'Enforce sandbox attribute on iframe elements',
116-
category: 'Best Practices',
116+
category: 'suggestion',
117117
recommended: false,
118118
url: docsUrl('iframe-missing-sandbox'),
119119
},

lib/rules/jsx-boolean-value.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module.exports = {
5858
meta: {
5959
docs: {
6060
description: 'Enforce boolean attributes notation in JSX',
61-
category: 'Stylistic Issues',
61+
category: 'suggestion',
6262
recommended: false,
6363
url: docsUrl('jsx-boolean-value'),
6464
},

lib/rules/jsx-child-element-spacing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = {
4848
meta: {
4949
docs: {
5050
description: 'Ensures inline tags are not rendered without spaces between them',
51-
category: 'Stylistic Issues',
51+
category: 'layout',
5252
recommended: false,
5353
url: docsUrl('jsx-child-element-spacing'),
5454
},

lib/rules/jsx-closing-bracket-location.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'Validate closing bracket location in JSX',
24-
category: 'Stylistic Issues',
24+
category: 'layout',
2525
recommended: false,
2626
url: docsUrl('jsx-closing-bracket-location'),
2727
},

lib/rules/jsx-closing-tag-location.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
meta: {
2323
docs: {
2424
description: 'Validate closing tag location for multiline JSX',
25-
category: 'Stylistic Issues',
25+
category: 'layout',
2626
recommended: false,
2727
url: docsUrl('jsx-closing-tag-location'),
2828
},

lib/rules/jsx-curly-brace-presence.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040
meta: {
4141
docs: {
4242
description: 'Disallow unnecessary JSX expressions when literals alone are sufficient or enfore JSX expressions on literals in JSX children or attributes',
43-
category: 'Stylistic Issues',
43+
category: 'layout',
4444
recommended: false,
4545
url: docsUrl('jsx-curly-brace-presence'),
4646
},

lib/rules/jsx-curly-newline.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = {
4747

4848
docs: {
4949
description: 'Enforce consistent line breaks inside jsx curly',
50-
category: 'Stylistic Issues',
50+
category: 'layout',
5151
recommended: false,
5252
url: docsUrl('jsx-curly-newline'),
5353
},

lib/rules/jsx-curly-spacing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = {
3838
meta: {
3939
docs: {
4040
description: 'Enforce or disallow spaces inside of curly braces in JSX attributes',
41-
category: 'Stylistic Issues',
41+
category: 'layout',
4242
recommended: false,
4343
url: docsUrl('jsx-curly-spacing'),
4444
},

lib/rules/jsx-equals-spacing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
meta: {
2424
docs: {
2525
description: 'Disallow or enforce spaces around equal signs in JSX attributes',
26-
category: 'Stylistic Issues',
26+
category: 'layout',
2727
recommended: false,
2828
url: docsUrl('jsx-equals-spacing'),
2929
},

lib/rules/jsx-filename-extension.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
meta: {
3232
docs: {
3333
description: 'Restrict file extensions that may contain JSX',
34-
category: 'Stylistic Issues',
34+
category: 'suggestion',
3535
recommended: false,
3636
url: docsUrl('jsx-filename-extension'),
3737
},

lib/rules/jsx-first-prop-new-line.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'Ensure proper position of the first property in JSX',
24-
category: 'Stylistic Issues',
24+
category: 'layout',
2525
recommended: false,
2626
url: docsUrl('jsx-first-prop-new-line'),
2727
},

lib/rules/jsx-fragments.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
meta: {
3232
docs: {
3333
description: 'Enforce shorthand or standard form for React fragments',
34-
category: 'Stylistic Issues',
34+
category: 'suggestion',
3535
recommended: false,
3636
url: docsUrl('jsx-fragments'),
3737
},

lib/rules/jsx-handler-names.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'Enforce event handler naming conventions in JSX',
24-
category: 'Stylistic Issues',
24+
category: 'suggestion',
2525
recommended: false,
2626
url: docsUrl('jsx-handler-names'),
2727
},

lib/rules/jsx-indent-props.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = {
4646
meta: {
4747
docs: {
4848
description: 'Validate props indentation in JSX',
49-
category: 'Stylistic Issues',
49+
category: 'layout',
5050
recommended: false,
5151
url: docsUrl('jsx-indent-props'),
5252
},

lib/rules/jsx-indent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
meta: {
5151
docs: {
5252
description: 'Validate JSX indentation',
53-
category: 'Stylistic Issues',
53+
category: 'layout',
5454
recommended: false,
5555
url: docsUrl('jsx-indent'),
5656
},

lib/rules/jsx-key.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = {
3535
meta: {
3636
docs: {
3737
description: 'Report missing `key` props in iterators/collection literals',
38-
category: 'Possible Errors',
38+
category: 'problem',
3939
recommended: true,
4040
url: docsUrl('jsx-key'),
4141
},

lib/rules/jsx-max-depth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
meta: {
2525
docs: {
2626
description: 'Validate JSX maximum depth',
27-
category: 'Stylistic Issues',
27+
category: 'suggestion',
2828
recommended: false,
2929
url: docsUrl('jsx-max-depth'),
3030
},

lib/rules/jsx-max-props-per-line.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
meta: {
2828
docs: {
2929
description: 'Limit maximum of props on a single line in JSX',
30-
category: 'Stylistic Issues',
30+
category: 'layout',
3131
recommended: false,
3232
url: docsUrl('jsx-max-props-per-line'),
3333
},

lib/rules/jsx-newline.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
meta: {
2323
docs: {
2424
description: 'Require or prevent a new line after jsx elements and expressions.',
25-
category: 'Stylistic Issues',
25+
category: 'layout',
2626
recommended: false,
2727
url: docsUrl('jsx-newline'),
2828
},

lib/rules/jsx-no-bind.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
meta: {
2929
docs: {
3030
description: 'Prevents usage of Function.prototype.bind and arrow functions in React component props',
31-
category: 'Best Practices',
31+
category: 'suggestion',
3232
recommended: false,
3333
url: docsUrl('jsx-no-bind'),
3434
},

lib/rules/jsx-no-comment-textnodes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
meta: {
3838
docs: {
3939
description: 'Comments inside children section of tag should be placed inside braces',
40-
category: 'Possible Errors',
40+
category: 'problem',
4141
recommended: true,
4242
url: docsUrl('jsx-no-comment-textnodes'),
4343
},

lib/rules/jsx-no-constructed-context-values.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ module.exports = {
132132
meta: {
133133
docs: {
134134
description: 'Prevents JSX context provider values from taking values that will cause needless rerenders.',
135-
category: 'Best Practices',
135+
category: 'suggestion',
136136
recommended: false,
137137
url: docsUrl('jsx-no-constructed-context-values'),
138138
},

lib/rules/jsx-no-duplicate-props.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'Enforce no duplicate props',
24-
category: 'Possible Errors',
24+
category: 'problem',
2525
recommended: true,
2626
url: docsUrl('jsx-no-duplicate-props'),
2727
},

lib/rules/jsx-no-literals.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
meta: {
2929
docs: {
3030
description: 'Prevent using string literals in React component definition',
31-
category: 'Stylistic Issues',
31+
category: 'layout',
3232
recommended: false,
3333
url: docsUrl('jsx-no-literals'),
3434
},

lib/rules/jsx-no-script-url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports = {
5151
meta: {
5252
docs: {
5353
description: 'Forbid `javascript:` URLs',
54-
category: 'Best Practices',
54+
category: 'suggestion',
5555
recommended: false,
5656
url: docsUrl('jsx-no-script-url'),
5757
},

lib/rules/jsx-no-target-blank.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module.exports = {
106106
fixable: 'code',
107107
docs: {
108108
description: 'Forbid `target="_blank"` attribute without `rel="noreferrer"`',
109-
category: 'Best Practices',
109+
category: 'suggestion',
110110
recommended: true,
111111
url: docsUrl('jsx-no-target-blank'),
112112
},

lib/rules/jsx-no-undef.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'Disallow undeclared variables in JSX',
24-
category: 'Possible Errors',
24+
category: 'problem',
2525
recommended: true,
2626
url: docsUrl('jsx-no-undef'),
2727
},

lib/rules/jsx-no-useless-fragment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module.exports = {
8989
fixable: 'code',
9090
docs: {
9191
description: 'Disallow unnecessary fragments',
92-
category: 'Possible Errors',
92+
category: 'suggestion',
9393
recommended: false,
9494
url: docsUrl('jsx-no-useless-fragment'),
9595
},

lib/rules/jsx-one-expression-per-line.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
meta: {
2626
docs: {
2727
description: 'Limit to one expression per line in JSX',
28-
category: 'Stylistic Issues',
28+
category: 'layout',
2929
recommended: false,
3030
url: docsUrl('jsx-one-expression-per-line'),
3131
},

lib/rules/jsx-pascal-case.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module.exports = {
8080
meta: {
8181
docs: {
8282
description: 'Enforce PascalCase for user-defined JSX components',
83-
category: 'Stylistic Issues',
83+
category: 'suggestion',
8484
recommended: false,
8585
url: docsUrl('jsx-pascal-case'),
8686
},

lib/rules/jsx-props-no-multi-spaces.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'Disallow multiple spaces between inline JSX props',
24-
category: 'Stylistic Issues',
24+
category: 'layout',
2525
recommended: false,
2626
url: docsUrl('jsx-props-no-multi-spaces'),
2727
},

lib/rules/jsx-props-no-spreading.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242
meta: {
4343
docs: {
4444
description: 'Prevent JSX prop spreading',
45-
category: 'Best Practices',
45+
category: 'suggestion',
4646
recommended: false,
4747
url: docsUrl('jsx-props-no-spreading'),
4848
},

0 commit comments

Comments
 (0)