@paratco/eslint-config 2.3.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +186 -21
  3. package/dist/index.d.ts +20 -3571
  4. package/dist/index.js +2 -14
  5. package/dist/index.js.map +1 -0
  6. package/package.json +40 -27
  7. package/dist/configs/base.d.ts +0 -138
  8. package/dist/configs/base.d.ts.map +0 -1
  9. package/dist/configs/base.js +0 -29
  10. package/dist/configs/import.d.ts +0 -83
  11. package/dist/configs/import.d.ts.map +0 -1
  12. package/dist/configs/import.js +0 -41
  13. package/dist/configs/node.d.ts +0 -221
  14. package/dist/configs/node.d.ts.map +0 -1
  15. package/dist/configs/node.js +0 -7
  16. package/dist/configs/prettierFormatter.d.ts +0 -5
  17. package/dist/configs/prettierFormatter.d.ts.map +0 -1
  18. package/dist/configs/prettierFormatter.js +0 -3
  19. package/dist/configs/react.d.ts +0 -2917
  20. package/dist/configs/react.d.ts.map +0 -1
  21. package/dist/configs/react.js +0 -51
  22. package/dist/configs/stylisticFormatter.d.ts +0 -218
  23. package/dist/configs/stylisticFormatter.d.ts.map +0 -1
  24. package/dist/configs/stylisticFormatter.js +0 -29
  25. package/dist/index.d.ts.map +0 -1
  26. package/dist/rules/import.d.ts +0 -59
  27. package/dist/rules/import.d.ts.map +0 -1
  28. package/dist/rules/import.js +0 -139
  29. package/dist/rules/javascript.d.ts +0 -23
  30. package/dist/rules/javascript.d.ts.map +0 -1
  31. package/dist/rules/javascript.js +0 -42
  32. package/dist/rules/react.d.ts +0 -112
  33. package/dist/rules/react.d.ts.map +0 -1
  34. package/dist/rules/react.js +0 -330
  35. package/dist/rules/stylistic.d.ts +0 -208
  36. package/dist/rules/stylistic.d.ts.map +0 -1
  37. package/dist/rules/stylistic.js +0 -439
  38. package/dist/rules/typescript.d.ts +0 -96
  39. package/dist/rules/typescript.d.ts.map +0 -1
  40. package/dist/rules/typescript.js +0 -254
  41. package/dist/rules/unicorn.d.ts +0 -14
  42. package/dist/rules/unicorn.d.ts.map +0 -1
  43. package/dist/rules/unicorn.js +0 -32
@@ -1,112 +0,0 @@
1
- declare const _default: {
2
- readonly "react/boolean-prop-naming": readonly ["error"];
3
- readonly "react/button-has-type": readonly ["error"];
4
- readonly "react/checked-requires-onchange-or-readonly": readonly ["off"];
5
- readonly "react/default-props-match-prop-types": readonly ["error"];
6
- readonly "react/destructuring-assignment": readonly ["warn"];
7
- readonly "react/display-name": readonly ["error"];
8
- readonly "react/forbid-component-props": readonly ["off"];
9
- readonly "react/forbid-dom-props": readonly ["off"];
10
- readonly "react/forbid-elements": readonly ["off"];
11
- readonly "react/forbid-foreign-prop-types": readonly ["error"];
12
- readonly "react/forbid-prop-types": readonly ["error"];
13
- readonly "react/forward-ref-uses-ref": readonly ["off"];
14
- readonly "react/function-component-definition": readonly ["warn"];
15
- readonly "react/hook-use-state": readonly ["error"];
16
- readonly "react/iframe-missing-sandbox": readonly ["error"];
17
- readonly "react/jsx-boolean-value": readonly ["warn", "always"];
18
- readonly "react/jsx-child-element-spacing": readonly ["error"];
19
- readonly "react/jsx-closing-bracket-location": readonly ["off"];
20
- readonly "react/jsx-closing-tag-location": readonly ["off"];
21
- readonly "react/jsx-curly-brace-presence": readonly ["off"];
22
- readonly "react/jsx-curly-newline": readonly ["off"];
23
- readonly "react/jsx-curly-spacing": readonly ["off"];
24
- readonly "react/jsx-equals-spacing": readonly ["off"];
25
- readonly "react/jsx-filename-extension": readonly ["error", {
26
- readonly allow: "always";
27
- readonly extensions: readonly [".tsx"];
28
- }];
29
- readonly "react/jsx-first-prop-new-line": readonly ["off"];
30
- readonly "react/jsx-fragments": readonly ["warn"];
31
- readonly "react/jsx-handler-names": readonly ["error"];
32
- readonly "react/jsx-indent": readonly ["off"];
33
- readonly "react/jsx-indent-props": readonly ["off"];
34
- readonly "react/jsx-key": readonly ["error"];
35
- readonly "react/jsx-max-depth": readonly ["off"];
36
- readonly "react/jsx-max-props-per-line": readonly ["off"];
37
- readonly "react/jsx-newline": readonly ["off"];
38
- readonly "react/jsx-no-bind": readonly ["error", {
39
- readonly allowArrowFunctions: true;
40
- }];
41
- readonly "react/jsx-no-comment-textnodes": readonly ["error"];
42
- readonly "react/jsx-no-constructed-context-values": readonly ["error"];
43
- readonly "react/jsx-no-duplicate-props": readonly ["error"];
44
- readonly "react/jsx-no-leaked-render": readonly ["warn"];
45
- readonly "react/jsx-no-literals": readonly ["off"];
46
- readonly "react/jsx-no-script-url": readonly ["error"];
47
- readonly "react/jsx-no-target-blank": readonly ["warn"];
48
- readonly "react/jsx-no-undef": readonly ["error"];
49
- readonly "react/jsx-no-useless-fragment": readonly ["warn"];
50
- readonly "react/jsx-one-expression-per-line": readonly ["off"];
51
- readonly "react/jsx-pascal-case": readonly ["off"];
52
- readonly "react/jsx-props-no-multi-spaces": readonly ["off"];
53
- readonly "react/jsx-props-no-spread-multi": readonly ["off"];
54
- readonly "react/jsx-props-no-spreading": readonly ["off"];
55
- readonly "react/jsx-sort-props": readonly ["off"];
56
- readonly "react/jsx-tag-spacing": readonly ["off"];
57
- readonly "react/jsx-uses-react": readonly ["error"];
58
- readonly "react/jsx-uses-vars": readonly ["error"];
59
- readonly "react/jsx-wrap-multilines": readonly ["off"];
60
- readonly "react/no-access-state-in-setstate": readonly ["error"];
61
- readonly "react/no-adjacent-inline-elements": readonly ["error"];
62
- readonly "react/no-array-index-key": readonly ["error"];
63
- readonly "react/no-arrow-function-lifecycle": readonly ["warn"];
64
- readonly "react/no-children-prop": readonly ["error"];
65
- readonly "react/no-danger": readonly ["error"];
66
- readonly "react/no-danger-with-children": readonly ["error"];
67
- readonly "react/no-deprecated": readonly ["error"];
68
- readonly "react/no-did-mount-set-state": readonly ["error", "disallow-in-func"];
69
- readonly "react/no-did-update-set-state": readonly ["error", "disallow-in-func"];
70
- readonly "react/no-direct-mutation-state": readonly ["error"];
71
- readonly "react/no-find-dom-node": readonly ["error"];
72
- readonly "react/no-invalid-html-attribute": readonly ["error"];
73
- readonly "react/no-is-mounted": readonly ["error"];
74
- readonly "react/no-multi-comp": readonly ["off"];
75
- readonly "react/no-namespace": readonly ["error"];
76
- readonly "react/no-object-type-as-default-prop": readonly ["error"];
77
- readonly "react/no-redundant-should-component-update": readonly ["error"];
78
- readonly "react/no-render-return-value": readonly ["error"];
79
- readonly "react/no-set-state": readonly ["error"];
80
- readonly "react/no-string-refs": readonly ["error", {
81
- readonly noTemplateLiterals: true;
82
- }];
83
- readonly "react/no-this-in-sfc": readonly ["error"];
84
- readonly "react/no-typos": readonly ["error"];
85
- readonly "react/no-unescaped-entities": readonly ["error"];
86
- readonly "react/no-unknown-property": readonly ["warn"];
87
- readonly "react/no-unsafe": readonly ["off"];
88
- readonly "react/no-unstable-nested-components": readonly ["error"];
89
- readonly "react/no-unused-class-component-methods": readonly ["error"];
90
- readonly "react/no-unused-prop-types": readonly ["error"];
91
- readonly "react/no-unused-state": readonly ["error"];
92
- readonly "react/no-will-update-set-state": readonly ["error", "disallow-in-func"];
93
- readonly "react/prefer-es6-class": readonly ["error"];
94
- readonly "react/prefer-exact-props": readonly ["error"];
95
- readonly "react/prefer-read-only-props": readonly ["warn"];
96
- readonly "react/prefer-stateless-function": readonly ["error"];
97
- readonly "react/prop-types": readonly ["error"];
98
- readonly "react/react-in-jsx-scope": readonly ["off"];
99
- readonly "react/require-default-props": readonly ["off"];
100
- readonly "react/require-optimization": readonly ["error"];
101
- readonly "react/require-render-return": readonly ["error"];
102
- readonly "react/self-closing-comp": readonly ["warn"];
103
- readonly "react/sort-comp": readonly ["error"];
104
- readonly "react/sort-default-props": readonly ["off"];
105
- readonly "react/sort-prop-types": readonly ["off"];
106
- readonly "react/state-in-constructor": readonly ["error"];
107
- readonly "react/static-property-placement": readonly ["error"];
108
- readonly "react/style-prop-object": readonly ["error"];
109
- readonly "react/void-dom-elements-no-children": readonly ["error"];
110
- };
111
- export default _default;
112
- //# sourceMappingURL=react.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/rules/react.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA6aW"}
@@ -1,330 +0,0 @@
1
- export default {
2
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.md
3
- // Enforces consistent naming for boolean props
4
- "react/boolean-prop-naming": ["error"],
5
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
6
- // Disallow usage of button elements without an explicit type attribute
7
- "react/button-has-type": ["error"],
8
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
9
- // Enforce using onChange or readonly attribute when checked is used
10
- "react/checked-requires-onchange-or-readonly": ["off"],
11
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md
12
- // Enforce all defaultProps have a corresponding non-required PropType
13
- "react/default-props-match-prop-types": ["error"],
14
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
15
- // Enforce consistent usage of destructuring assignment of props, state, and context
16
- "react/destructuring-assignment": ["warn"],
17
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
18
- // Disallow missing displayName in a React component definition
19
- "react/display-name": ["error"],
20
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md
21
- // Disallow certain props on components
22
- "react/forbid-component-props": ["off"],
23
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-dom-props.md
24
- // Disallow certain props on DOM Nodes
25
- "react/forbid-dom-props": ["off"],
26
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md
27
- // Disallow certain elements
28
- "react/forbid-elements": ["off"],
29
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
30
- // Disallow using another component's propTypes
31
- "react/forbid-foreign-prop-types": ["error"],
32
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
33
- // Disallow certain propTypes
34
- "react/forbid-prop-types": ["error"],
35
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forward-ref-uses-ref.md
36
- // Require all forwardRef components include a ref parameter
37
- // It seems that React 19 doesn't require this rule
38
- "react/forward-ref-uses-ref": ["off"],
39
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
40
- // Enforce a specific function type for function components
41
- "react/function-component-definition": ["warn"],
42
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
43
- // Ensure destructuring and symmetric naming of useState hook value and setter variables
44
- "react/hook-use-state": ["error"],
45
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md
46
- // Enforce sandbox attribute on iframe elements
47
- "react/iframe-missing-sandbox": ["error"],
48
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
49
- // Enforce boolean attributes notation in JSX
50
- "react/jsx-boolean-value": ["warn", "always"],
51
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md
52
- // Enforce or disallow spaces inside curly braces in JSX attributes and expressions
53
- "react/jsx-child-element-spacing": ["error"],
54
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
55
- // Enforce closing bracket location in JSX
56
- // Use similar stylistic rule instead
57
- "react/jsx-closing-bracket-location": ["off"],
58
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
59
- // Enforce closing tag location for multiline JSX
60
- // Use similar stylistic rule instead
61
- "react/jsx-closing-tag-location": ["off"],
62
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
63
- // Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
64
- // Use similar stylistic rule instead
65
- "react/jsx-curly-brace-presence": ["off"],
66
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
67
- // Enforce consistent linebreaks in curly braces in JSX attributes and expressions
68
- // Use similar stylistic rule instead
69
- "react/jsx-curly-newline": ["off"],
70
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
71
- // Enforce or disallow spaces inside curly braces in JSX attributes and expressions
72
- // Use similar stylistic rule instead
73
- "react/jsx-curly-spacing": ["off"],
74
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md
75
- // Enforce or disallow spaces around equal signs in JSX attributes
76
- // Use similar stylistic rule instead
77
- "react/jsx-equals-spacing": ["off"],
78
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
79
- // Disallow file extensions that may contain JSX
80
- "react/jsx-filename-extension": ["error", { allow: "always", extensions: [".tsx"] }],
81
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
82
- // Enforce proper position of the first property in JSX
83
- // Use similar stylistic rule instead
84
- "react/jsx-first-prop-new-line": ["off"],
85
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
86
- // Enforce shorthand or standard form for React fragments
87
- "react/jsx-fragments": ["warn"],
88
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
89
- // Enforce event handler naming conventions in JSX
90
- "react/jsx-handler-names": ["error"],
91
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
92
- // Enforce JSX indentation
93
- // Use similar stylistic rule instead
94
- "react/jsx-indent": ["off"],
95
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
96
- // Enforce props indentation in JSX
97
- // Use similar stylistic rule instead
98
- "react/jsx-indent-props": ["off"],
99
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
100
- // Disallow missing key props in iterators/collection literals
101
- "react/jsx-key": ["error"],
102
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md
103
- // Enforce JSX maximum depth
104
- "react/jsx-max-depth": ["off"],
105
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
106
- // Enforce maximum of props on a single line in JSX
107
- // Use similar stylistic rule instead
108
- "react/jsx-max-props-per-line": ["off"],
109
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-newline.md
110
- // Require or prevent a new line after jsx elements and expressions
111
- // Use similar stylistic rule instead
112
- "react/jsx-newline": ["off"],
113
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
114
- // Disallow .bind() or arrow functions in JSX props
115
- "react/jsx-no-bind": [
116
- "error",
117
- {
118
- allowArrowFunctions: true
119
- }
120
- ],
121
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
122
- // Disallow comments from being inserted as text nodes
123
- "react/jsx-no-comment-textnodes": ["error"],
124
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md
125
- // Disallows JSX context provider values from taking values that will cause needless renders
126
- "react/jsx-no-constructed-context-values": ["error"],
127
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
128
- // Disallow duplicate properties in JSX
129
- "react/jsx-no-duplicate-props": ["error"],
130
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
131
- // Disallow problematic leaked values from being rendered
132
- "react/jsx-no-leaked-render": ["warn"],
133
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
134
- // Disallow usage of string literals in JSX
135
- "react/jsx-no-literals": ["off"],
136
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
137
- // Disallow usage of javascript: URLs
138
- "react/jsx-no-script-url": ["error"],
139
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
140
- // Disallow target="_blank" attribute without rel="noreferrer"
141
- "react/jsx-no-target-blank": ["warn"],
142
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
143
- // Disallow undeclared variables in JSX
144
- "react/jsx-no-undef": ["error"],
145
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
146
- // Disallow unnecessary fragments
147
- "react/jsx-no-useless-fragment": ["warn"],
148
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md
149
- // Require one JSX element per line
150
- // Use similar stylistic rule instead
151
- "react/jsx-one-expression-per-line": ["off"],
152
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
153
- // Enforce PascalCase for user-defined JSX components
154
- // Use similar stylistic rule instead
155
- "react/jsx-pascal-case": ["off"],
156
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md
157
- // Disallow multiple spaces between inline JSX props
158
- // Use similar stylistic rule instead
159
- "react/jsx-props-no-multi-spaces": ["off"],
160
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md
161
- // Disallow multiple spaces between inline JSX props
162
- "react/jsx-props-no-spread-multi": ["off"],
163
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
164
- // Disallow JSX prop spreading
165
- "react/jsx-props-no-spreading": ["off"],
166
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
167
- // Enforce props alphabetical sorting
168
- // Use similar stylistic rule instead
169
- "react/jsx-sort-props": ["off"],
170
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md
171
- // Enforce whitespace in and around the JSX opening and closing brackets
172
- // Use similar stylistic rule instead
173
- "react/jsx-tag-spacing": ["off"],
174
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
175
- // Disallow React to be incorrectly marked as unused
176
- "react/jsx-uses-react": ["error"],
177
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
178
- // Disallow variables used in JSX to be incorrectly marked as unused
179
- "react/jsx-uses-vars": ["error"],
180
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md
181
- // Disallow missing parentheses around multiline JSX
182
- // Use similar stylistic rule instead
183
- "react/jsx-wrap-multilines": ["off"],
184
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md
185
- // Disallow when this.state is accessed within setState
186
- "react/no-access-state-in-setstate": ["error"],
187
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
188
- // Disallow adjacent inline elements not separated by whitespace.
189
- "react/no-adjacent-inline-elements": ["error"],
190
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
191
- // Disallow usage of Array index in keys
192
- "react/no-array-index-key": ["error"],
193
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-arrow-function-lifecycle.md
194
- // Lifecycle methods should be methods on the prototype, not class fields
195
- "react/no-arrow-function-lifecycle": ["warn"],
196
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
197
- // Disallow passing of children as props
198
- "react/no-children-prop": ["error"],
199
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md
200
- // Disallow usage of dangerous JSX properties
201
- "react/no-danger": ["error"],
202
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
203
- // Disallow when a DOM element is using both children and dangerouslySetInnerHTML
204
- "react/no-danger-with-children": ["error"],
205
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
206
- // Disallow usage of deprecated methods
207
- "react/no-deprecated": ["error"],
208
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
209
- // Disallow usage of setState in componentDidMount
210
- "react/no-did-mount-set-state": ["error", "disallow-in-func"],
211
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
212
- // Disallow usage of setState in componentDidUpdate
213
- "react/no-did-update-set-state": ["error", "disallow-in-func"],
214
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
215
- // Disallow direct mutation of this.state
216
- "react/no-direct-mutation-state": ["error"],
217
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
218
- // Disallow usage of findDOMNode
219
- "react/no-find-dom-node": ["error"],
220
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-invalid-html-attribute.md
221
- // Disallow usage of invalid attributes
222
- "react/no-invalid-html-attribute": ["error"],
223
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
224
- // Disallow usage of isMounted
225
- "react/no-is-mounted": ["error"],
226
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
227
- // Disallow multiple component definition per file
228
- "react/no-multi-comp": ["off"],
229
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-namespace.md
230
- // Enforce that namespaces are not used in React elements
231
- "react/no-namespace": ["error"],
232
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md
233
- // Disallow usage of referential-type variables as default param in functional component
234
- "react/no-object-type-as-default-prop": ["error"],
235
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md
236
- // Disallow usage of shouldComponentUpdate when extending React.PureComponent
237
- "react/no-redundant-should-component-update": ["error"],
238
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
239
- // Disallow usage of the return value of ReactDOM.render
240
- "react/no-render-return-value": ["error"],
241
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
242
- // Disallow usage of setState
243
- "react/no-set-state": ["error"],
244
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
245
- // Disallow using string references
246
- "react/no-string-refs": ["error", { noTemplateLiterals: true }],
247
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md
248
- // Disallow this from being used in stateless functional components
249
- "react/no-this-in-sfc": ["error"],
250
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-typos.md
251
- // Disallow common typos
252
- "react/no-typos": ["error"],
253
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
254
- // Disallow unescaped HTML entities from appearing in markup
255
- "react/no-unescaped-entities": ["error"],
256
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
257
- // Disallow usage of unknown DOM property
258
- "react/no-unknown-property": ["warn"],
259
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
260
- // Disallow usage of unsafe lifecycle methods
261
- // Disabled in recommended configs
262
- "react/no-unsafe": ["off"],
263
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
264
- // Disallow creating unstable components inside components
265
- "react/no-unstable-nested-components": ["error"],
266
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-class-component-methods.md
267
- // Disallow declaring unused methods of component class
268
- "react/no-unused-class-component-methods": ["error"],
269
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md
270
- // Disallow definitions of unused propTypes
271
- "react/no-unused-prop-types": ["error"],
272
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md
273
- // Disallow definitions of unused state
274
- "react/no-unused-state": ["error"],
275
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
276
- // Disallow usage of setState in componentWillUpdate
277
- "react/no-will-update-set-state": ["error", "disallow-in-func"],
278
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
279
- // Enforce ES5 or ES6 class for React Components
280
- "react/prefer-es6-class": ["error"],
281
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-exact-props.md
282
- // Prefer exact prop type definitions
283
- "react/prefer-exact-props": ["error"],
284
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
285
- // Enforce that props are read-only
286
- "react/prefer-read-only-props": ["warn"],
287
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
288
- // Enforce stateless components to be written as a pure function
289
- "react/prefer-stateless-function": ["error"],
290
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prop-types.md
291
- // Disallow missing props validation in a React component definition
292
- "react/prop-types": ["error"],
293
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md
294
- // Disallow missing React when using JSX
295
- // Disable this rule because react 17 doesn't need to import React to use JSX
296
- "react/react-in-jsx-scope": ["off"],
297
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-default-props.md
298
- // Enforce a defaultProps definition for every prop that is not a required prop
299
- "react/require-default-props": ["off"],
300
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-optimization.md
301
- // Enforce React components to have a shouldComponentUpdate method
302
- "react/require-optimization": ["error"],
303
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
304
- // Enforce ES5 or ES6 class for returning value in render function
305
- "react/require-render-return": ["error"],
306
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
307
- // Disallow extra closing tags for components without children
308
- "react/self-closing-comp": ["warn"],
309
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-comp.md
310
- // Enforce component methods order
311
- "react/sort-comp": ["error"],
312
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md
313
- // Enforce defaultProps declarations alphabetical sorting
314
- "react/sort-default-props": ["off"],
315
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md
316
- // Enforce propTypes declarations alphabetical sorting
317
- "react/sort-prop-types": ["off"],
318
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md
319
- // Enforce class component state initialization style
320
- "react/state-in-constructor": ["error"],
321
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md
322
- // Enforces where React component static properties should be positioned.
323
- "react/static-property-placement": ["error"],
324
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
325
- // Enforce style prop value is an object
326
- "react/style-prop-object": ["error"],
327
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
328
- // Disallow void DOM elements (e.g. <img />, <br />) from receiving children
329
- "react/void-dom-elements-no-children": ["error"]
330
- };