@kazupon/eslint-config 0.12.0 → 0.13.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.
- package/README.md +19 -17
- package/dist/configs/index.d.cts +1 -0
- package/dist/configs/index.d.ts +1 -0
- package/dist/configs/react.d.cts +26 -0
- package/dist/configs/react.d.ts +26 -0
- package/dist/index.cjs +51 -8
- package/dist/index.js +46 -9
- package/dist/types/gens/eslint.d.cts +2 -1
- package/dist/types/gens/eslint.d.ts +2 -1
- package/dist/types/gens/react.d.cts +1053 -0
- package/dist/types/gens/react.d.ts +1053 -0
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/overrides.d.cts +1 -0
- package/dist/types/overrides.d.ts +1 -0
- package/dist/utils.d.cts +6 -0
- package/dist/utils.d.ts +6 -0
- package/package.json +16 -1
|
@@ -0,0 +1,1053 @@
|
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
2
|
+
export interface ReactRules {
|
|
3
|
+
/**
|
|
4
|
+
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
5
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
6
|
+
*/
|
|
7
|
+
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>;
|
|
8
|
+
/**
|
|
9
|
+
* enforces the Rules of Hooks
|
|
10
|
+
* @see https://reactjs.org/docs/hooks-rules.html
|
|
11
|
+
*/
|
|
12
|
+
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>;
|
|
13
|
+
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
14
|
+
/**
|
|
15
|
+
* Enforces consistent naming for boolean props
|
|
16
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md
|
|
17
|
+
*/
|
|
18
|
+
'react/boolean-prop-naming'?: Linter.RuleEntry<ReactBooleanPropNaming>;
|
|
19
|
+
/**
|
|
20
|
+
* Disallow usage of `button` elements without an explicit `type` attribute
|
|
21
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/button-has-type.md
|
|
22
|
+
*/
|
|
23
|
+
'react/button-has-type'?: Linter.RuleEntry<ReactButtonHasType>;
|
|
24
|
+
/**
|
|
25
|
+
* Enforce using `onChange` or `readonly` attribute when `checked` is used
|
|
26
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/checked-requires-onchange-or-readonly.md
|
|
27
|
+
*/
|
|
28
|
+
'react/checked-requires-onchange-or-readonly'?: Linter.RuleEntry<ReactCheckedRequiresOnchangeOrReadonly>;
|
|
29
|
+
/**
|
|
30
|
+
* Enforce all defaultProps have a corresponding non-required PropType
|
|
31
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/default-props-match-prop-types.md
|
|
32
|
+
*/
|
|
33
|
+
'react/default-props-match-prop-types'?: Linter.RuleEntry<ReactDefaultPropsMatchPropTypes>;
|
|
34
|
+
/**
|
|
35
|
+
* Enforce consistent usage of destructuring assignment of props, state, and context
|
|
36
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/destructuring-assignment.md
|
|
37
|
+
*/
|
|
38
|
+
'react/destructuring-assignment'?: Linter.RuleEntry<ReactDestructuringAssignment>;
|
|
39
|
+
/**
|
|
40
|
+
* Disallow missing displayName in a React component definition
|
|
41
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md
|
|
42
|
+
*/
|
|
43
|
+
'react/display-name'?: Linter.RuleEntry<ReactDisplayName>;
|
|
44
|
+
/**
|
|
45
|
+
* Disallow certain props on components
|
|
46
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-component-props.md
|
|
47
|
+
*/
|
|
48
|
+
'react/forbid-component-props'?: Linter.RuleEntry<ReactForbidComponentProps>;
|
|
49
|
+
/**
|
|
50
|
+
* Disallow certain props on DOM Nodes
|
|
51
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-dom-props.md
|
|
52
|
+
*/
|
|
53
|
+
'react/forbid-dom-props'?: Linter.RuleEntry<ReactForbidDomProps>;
|
|
54
|
+
/**
|
|
55
|
+
* Disallow certain elements
|
|
56
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-elements.md
|
|
57
|
+
*/
|
|
58
|
+
'react/forbid-elements'?: Linter.RuleEntry<ReactForbidElements>;
|
|
59
|
+
/**
|
|
60
|
+
* Disallow using another component's propTypes
|
|
61
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-foreign-prop-types.md
|
|
62
|
+
*/
|
|
63
|
+
'react/forbid-foreign-prop-types'?: Linter.RuleEntry<ReactForbidForeignPropTypes>;
|
|
64
|
+
/**
|
|
65
|
+
* Disallow certain propTypes
|
|
66
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md
|
|
67
|
+
*/
|
|
68
|
+
'react/forbid-prop-types'?: Linter.RuleEntry<ReactForbidPropTypes>;
|
|
69
|
+
/**
|
|
70
|
+
* Enforce a specific function type for function components
|
|
71
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/function-component-definition.md
|
|
72
|
+
*/
|
|
73
|
+
'react/function-component-definition'?: Linter.RuleEntry<ReactFunctionComponentDefinition>;
|
|
74
|
+
/**
|
|
75
|
+
* Ensure destructuring and symmetric naming of useState hook value and setter variables
|
|
76
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/hook-use-state.md
|
|
77
|
+
*/
|
|
78
|
+
'react/hook-use-state'?: Linter.RuleEntry<ReactHookUseState>;
|
|
79
|
+
/**
|
|
80
|
+
* Enforce sandbox attribute on iframe elements
|
|
81
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/iframe-missing-sandbox.md
|
|
82
|
+
*/
|
|
83
|
+
'react/iframe-missing-sandbox'?: Linter.RuleEntry<[]>;
|
|
84
|
+
/**
|
|
85
|
+
* Enforce boolean attributes notation in JSX
|
|
86
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-boolean-value.md
|
|
87
|
+
*/
|
|
88
|
+
'react/jsx-boolean-value'?: Linter.RuleEntry<ReactJsxBooleanValue>;
|
|
89
|
+
/**
|
|
90
|
+
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
|
|
91
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-child-element-spacing.md
|
|
92
|
+
*/
|
|
93
|
+
'react/jsx-child-element-spacing'?: Linter.RuleEntry<[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Enforce closing bracket location in JSX
|
|
96
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-bracket-location.md
|
|
97
|
+
*/
|
|
98
|
+
'react/jsx-closing-bracket-location'?: Linter.RuleEntry<ReactJsxClosingBracketLocation>;
|
|
99
|
+
/**
|
|
100
|
+
* Enforce closing tag location for multiline JSX
|
|
101
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-tag-location.md
|
|
102
|
+
*/
|
|
103
|
+
'react/jsx-closing-tag-location'?: Linter.RuleEntry<ReactJsxClosingTagLocation>;
|
|
104
|
+
/**
|
|
105
|
+
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
|
|
106
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-brace-presence.md
|
|
107
|
+
*/
|
|
108
|
+
'react/jsx-curly-brace-presence'?: Linter.RuleEntry<ReactJsxCurlyBracePresence>;
|
|
109
|
+
/**
|
|
110
|
+
* Enforce consistent linebreaks in curly braces in JSX attributes and expressions
|
|
111
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-newline.md
|
|
112
|
+
*/
|
|
113
|
+
'react/jsx-curly-newline'?: Linter.RuleEntry<ReactJsxCurlyNewline>;
|
|
114
|
+
/**
|
|
115
|
+
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
|
|
116
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-spacing.md
|
|
117
|
+
*/
|
|
118
|
+
'react/jsx-curly-spacing'?: Linter.RuleEntry<ReactJsxCurlySpacing>;
|
|
119
|
+
/**
|
|
120
|
+
* Enforce or disallow spaces around equal signs in JSX attributes
|
|
121
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-equals-spacing.md
|
|
122
|
+
*/
|
|
123
|
+
'react/jsx-equals-spacing'?: Linter.RuleEntry<ReactJsxEqualsSpacing>;
|
|
124
|
+
/**
|
|
125
|
+
* Disallow file extensions that may contain JSX
|
|
126
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-filename-extension.md
|
|
127
|
+
*/
|
|
128
|
+
'react/jsx-filename-extension'?: Linter.RuleEntry<ReactJsxFilenameExtension>;
|
|
129
|
+
/**
|
|
130
|
+
* Enforce proper position of the first property in JSX
|
|
131
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-first-prop-new-line.md
|
|
132
|
+
*/
|
|
133
|
+
'react/jsx-first-prop-new-line'?: Linter.RuleEntry<ReactJsxFirstPropNewLine>;
|
|
134
|
+
/**
|
|
135
|
+
* Enforce shorthand or standard form for React fragments
|
|
136
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-fragments.md
|
|
137
|
+
*/
|
|
138
|
+
'react/jsx-fragments'?: Linter.RuleEntry<ReactJsxFragments>;
|
|
139
|
+
/**
|
|
140
|
+
* Enforce event handler naming conventions in JSX
|
|
141
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-handler-names.md
|
|
142
|
+
*/
|
|
143
|
+
'react/jsx-handler-names'?: Linter.RuleEntry<ReactJsxHandlerNames>;
|
|
144
|
+
/**
|
|
145
|
+
* Enforce JSX indentation
|
|
146
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent.md
|
|
147
|
+
*/
|
|
148
|
+
'react/jsx-indent'?: Linter.RuleEntry<ReactJsxIndent>;
|
|
149
|
+
/**
|
|
150
|
+
* Enforce props indentation in JSX
|
|
151
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent-props.md
|
|
152
|
+
*/
|
|
153
|
+
'react/jsx-indent-props'?: Linter.RuleEntry<ReactJsxIndentProps>;
|
|
154
|
+
/**
|
|
155
|
+
* Disallow missing `key` props in iterators/collection literals
|
|
156
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md
|
|
157
|
+
*/
|
|
158
|
+
'react/jsx-key'?: Linter.RuleEntry<ReactJsxKey>;
|
|
159
|
+
/**
|
|
160
|
+
* Enforce JSX maximum depth
|
|
161
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-depth.md
|
|
162
|
+
*/
|
|
163
|
+
'react/jsx-max-depth'?: Linter.RuleEntry<ReactJsxMaxDepth>;
|
|
164
|
+
/**
|
|
165
|
+
* Enforce maximum of props on a single line in JSX
|
|
166
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-props-per-line.md
|
|
167
|
+
*/
|
|
168
|
+
'react/jsx-max-props-per-line'?: Linter.RuleEntry<ReactJsxMaxPropsPerLine>;
|
|
169
|
+
/**
|
|
170
|
+
* Require or prevent a new line after jsx elements and expressions.
|
|
171
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-newline.md
|
|
172
|
+
*/
|
|
173
|
+
'react/jsx-newline'?: Linter.RuleEntry<ReactJsxNewline>;
|
|
174
|
+
/**
|
|
175
|
+
* Disallow `.bind()` or arrow functions in JSX props
|
|
176
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-bind.md
|
|
177
|
+
*/
|
|
178
|
+
'react/jsx-no-bind'?: Linter.RuleEntry<ReactJsxNoBind>;
|
|
179
|
+
/**
|
|
180
|
+
* Disallow comments from being inserted as text nodes
|
|
181
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md
|
|
182
|
+
*/
|
|
183
|
+
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
184
|
+
/**
|
|
185
|
+
* Disallows JSX context provider values from taking values that will cause needless rerenders
|
|
186
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-constructed-context-values.md
|
|
187
|
+
*/
|
|
188
|
+
'react/jsx-no-constructed-context-values'?: Linter.RuleEntry<[]>;
|
|
189
|
+
/**
|
|
190
|
+
* Disallow duplicate properties in JSX
|
|
191
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md
|
|
192
|
+
*/
|
|
193
|
+
'react/jsx-no-duplicate-props'?: Linter.RuleEntry<ReactJsxNoDuplicateProps>;
|
|
194
|
+
/**
|
|
195
|
+
* Disallow problematic leaked values from being rendered
|
|
196
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-leaked-render.md
|
|
197
|
+
*/
|
|
198
|
+
'react/jsx-no-leaked-render'?: Linter.RuleEntry<ReactJsxNoLeakedRender>;
|
|
199
|
+
/**
|
|
200
|
+
* Disallow usage of string literals in JSX
|
|
201
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-literals.md
|
|
202
|
+
*/
|
|
203
|
+
'react/jsx-no-literals'?: Linter.RuleEntry<ReactJsxNoLiterals>;
|
|
204
|
+
/**
|
|
205
|
+
* Disallow usage of `javascript:` URLs
|
|
206
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-script-url.md
|
|
207
|
+
*/
|
|
208
|
+
'react/jsx-no-script-url'?: Linter.RuleEntry<ReactJsxNoScriptUrl>;
|
|
209
|
+
/**
|
|
210
|
+
* Disallow `target="_blank"` attribute without `rel="noreferrer"`
|
|
211
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md
|
|
212
|
+
*/
|
|
213
|
+
'react/jsx-no-target-blank'?: Linter.RuleEntry<ReactJsxNoTargetBlank>;
|
|
214
|
+
/**
|
|
215
|
+
* Disallow undeclared variables in JSX
|
|
216
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md
|
|
217
|
+
*/
|
|
218
|
+
'react/jsx-no-undef'?: Linter.RuleEntry<ReactJsxNoUndef>;
|
|
219
|
+
/**
|
|
220
|
+
* Disallow unnecessary fragments
|
|
221
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-useless-fragment.md
|
|
222
|
+
*/
|
|
223
|
+
'react/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactJsxNoUselessFragment>;
|
|
224
|
+
/**
|
|
225
|
+
* Require one JSX element per line
|
|
226
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-one-expression-per-line.md
|
|
227
|
+
*/
|
|
228
|
+
'react/jsx-one-expression-per-line'?: Linter.RuleEntry<ReactJsxOneExpressionPerLine>;
|
|
229
|
+
/**
|
|
230
|
+
* Enforce PascalCase for user-defined JSX components
|
|
231
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-pascal-case.md
|
|
232
|
+
*/
|
|
233
|
+
'react/jsx-pascal-case'?: Linter.RuleEntry<ReactJsxPascalCase>;
|
|
234
|
+
/**
|
|
235
|
+
* Disallow multiple spaces between inline JSX props
|
|
236
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-multi-spaces.md
|
|
237
|
+
*/
|
|
238
|
+
'react/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>;
|
|
239
|
+
/**
|
|
240
|
+
* Disallow JSX prop spreading the same identifier multiple times
|
|
241
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spread-multi.md
|
|
242
|
+
*/
|
|
243
|
+
'react/jsx-props-no-spread-multi'?: Linter.RuleEntry<[]>;
|
|
244
|
+
/**
|
|
245
|
+
* Disallow JSX prop spreading
|
|
246
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spreading.md
|
|
247
|
+
*/
|
|
248
|
+
'react/jsx-props-no-spreading'?: Linter.RuleEntry<ReactJsxPropsNoSpreading>;
|
|
249
|
+
/**
|
|
250
|
+
* Enforce defaultProps declarations alphabetical sorting
|
|
251
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md
|
|
252
|
+
* @deprecated
|
|
253
|
+
*/
|
|
254
|
+
'react/jsx-sort-default-props'?: Linter.RuleEntry<ReactJsxSortDefaultProps>;
|
|
255
|
+
/**
|
|
256
|
+
* Enforce props alphabetical sorting
|
|
257
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-props.md
|
|
258
|
+
*/
|
|
259
|
+
'react/jsx-sort-props'?: Linter.RuleEntry<ReactJsxSortProps>;
|
|
260
|
+
/**
|
|
261
|
+
* Enforce spacing before closing bracket in JSX
|
|
262
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md
|
|
263
|
+
* @deprecated
|
|
264
|
+
*/
|
|
265
|
+
'react/jsx-space-before-closing'?: Linter.RuleEntry<ReactJsxSpaceBeforeClosing>;
|
|
266
|
+
/**
|
|
267
|
+
* Enforce whitespace in and around the JSX opening and closing brackets
|
|
268
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-tag-spacing.md
|
|
269
|
+
*/
|
|
270
|
+
'react/jsx-tag-spacing'?: Linter.RuleEntry<ReactJsxTagSpacing>;
|
|
271
|
+
/**
|
|
272
|
+
* Disallow React to be incorrectly marked as unused
|
|
273
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md
|
|
274
|
+
*/
|
|
275
|
+
'react/jsx-uses-react'?: Linter.RuleEntry<[]>;
|
|
276
|
+
/**
|
|
277
|
+
* Disallow variables used in JSX to be incorrectly marked as unused
|
|
278
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md
|
|
279
|
+
*/
|
|
280
|
+
'react/jsx-uses-vars'?: Linter.RuleEntry<[]>;
|
|
281
|
+
/**
|
|
282
|
+
* Disallow missing parentheses around multiline JSX
|
|
283
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md
|
|
284
|
+
*/
|
|
285
|
+
'react/jsx-wrap-multilines'?: Linter.RuleEntry<ReactJsxWrapMultilines>;
|
|
286
|
+
/**
|
|
287
|
+
* Disallow when this.state is accessed within setState
|
|
288
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-access-state-in-setstate.md
|
|
289
|
+
*/
|
|
290
|
+
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
291
|
+
/**
|
|
292
|
+
* Disallow adjacent inline elements not separated by whitespace.
|
|
293
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-adjacent-inline-elements.md
|
|
294
|
+
*/
|
|
295
|
+
'react/no-adjacent-inline-elements'?: Linter.RuleEntry<[]>;
|
|
296
|
+
/**
|
|
297
|
+
* Disallow usage of Array index in keys
|
|
298
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-array-index-key.md
|
|
299
|
+
*/
|
|
300
|
+
'react/no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
301
|
+
/**
|
|
302
|
+
* Lifecycle methods should be methods on the prototype, not class fields
|
|
303
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-arrow-function-lifecycle.md
|
|
304
|
+
*/
|
|
305
|
+
'react/no-arrow-function-lifecycle'?: Linter.RuleEntry<[]>;
|
|
306
|
+
/**
|
|
307
|
+
* Disallow passing of children as props
|
|
308
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md
|
|
309
|
+
*/
|
|
310
|
+
'react/no-children-prop'?: Linter.RuleEntry<ReactNoChildrenProp>;
|
|
311
|
+
/**
|
|
312
|
+
* Disallow usage of dangerous JSX properties
|
|
313
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger.md
|
|
314
|
+
*/
|
|
315
|
+
'react/no-danger'?: Linter.RuleEntry<ReactNoDanger>;
|
|
316
|
+
/**
|
|
317
|
+
* Disallow when a DOM element is using both children and dangerouslySetInnerHTML
|
|
318
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md
|
|
319
|
+
*/
|
|
320
|
+
'react/no-danger-with-children'?: Linter.RuleEntry<[]>;
|
|
321
|
+
/**
|
|
322
|
+
* Disallow usage of deprecated methods
|
|
323
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md
|
|
324
|
+
*/
|
|
325
|
+
'react/no-deprecated'?: Linter.RuleEntry<[]>;
|
|
326
|
+
/**
|
|
327
|
+
* Disallow usage of setState in componentDidMount
|
|
328
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-mount-set-state.md
|
|
329
|
+
*/
|
|
330
|
+
'react/no-did-mount-set-state'?: Linter.RuleEntry<ReactNoDidMountSetState>;
|
|
331
|
+
/**
|
|
332
|
+
* Disallow usage of setState in componentDidUpdate
|
|
333
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-update-set-state.md
|
|
334
|
+
*/
|
|
335
|
+
'react/no-did-update-set-state'?: Linter.RuleEntry<ReactNoDidUpdateSetState>;
|
|
336
|
+
/**
|
|
337
|
+
* Disallow direct mutation of this.state
|
|
338
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md
|
|
339
|
+
*/
|
|
340
|
+
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
341
|
+
/**
|
|
342
|
+
* Disallow usage of findDOMNode
|
|
343
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md
|
|
344
|
+
*/
|
|
345
|
+
'react/no-find-dom-node'?: Linter.RuleEntry<[]>;
|
|
346
|
+
/**
|
|
347
|
+
* Disallow usage of invalid attributes
|
|
348
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-invalid-html-attribute.md
|
|
349
|
+
*/
|
|
350
|
+
'react/no-invalid-html-attribute'?: Linter.RuleEntry<ReactNoInvalidHtmlAttribute>;
|
|
351
|
+
/**
|
|
352
|
+
* Disallow usage of isMounted
|
|
353
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md
|
|
354
|
+
*/
|
|
355
|
+
'react/no-is-mounted'?: Linter.RuleEntry<[]>;
|
|
356
|
+
/**
|
|
357
|
+
* Disallow multiple component definition per file
|
|
358
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-multi-comp.md
|
|
359
|
+
*/
|
|
360
|
+
'react/no-multi-comp'?: Linter.RuleEntry<ReactNoMultiComp>;
|
|
361
|
+
/**
|
|
362
|
+
* Enforce that namespaces are not used in React elements
|
|
363
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-namespace.md
|
|
364
|
+
*/
|
|
365
|
+
'react/no-namespace'?: Linter.RuleEntry<[]>;
|
|
366
|
+
/**
|
|
367
|
+
* Disallow usage of referential-type variables as default param in functional component
|
|
368
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-object-type-as-default-prop.md
|
|
369
|
+
*/
|
|
370
|
+
'react/no-object-type-as-default-prop'?: Linter.RuleEntry<[]>;
|
|
371
|
+
/**
|
|
372
|
+
* Disallow usage of shouldComponentUpdate when extending React.PureComponent
|
|
373
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md
|
|
374
|
+
*/
|
|
375
|
+
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
376
|
+
/**
|
|
377
|
+
* Disallow usage of the return value of ReactDOM.render
|
|
378
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md
|
|
379
|
+
*/
|
|
380
|
+
'react/no-render-return-value'?: Linter.RuleEntry<[]>;
|
|
381
|
+
/**
|
|
382
|
+
* Disallow usage of setState
|
|
383
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-set-state.md
|
|
384
|
+
*/
|
|
385
|
+
'react/no-set-state'?: Linter.RuleEntry<[]>;
|
|
386
|
+
/**
|
|
387
|
+
* Disallow using string references
|
|
388
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md
|
|
389
|
+
*/
|
|
390
|
+
'react/no-string-refs'?: Linter.RuleEntry<ReactNoStringRefs>;
|
|
391
|
+
/**
|
|
392
|
+
* Disallow `this` from being used in stateless functional components
|
|
393
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-this-in-sfc.md
|
|
394
|
+
*/
|
|
395
|
+
'react/no-this-in-sfc'?: Linter.RuleEntry<[]>;
|
|
396
|
+
/**
|
|
397
|
+
* Disallow common typos
|
|
398
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-typos.md
|
|
399
|
+
*/
|
|
400
|
+
'react/no-typos'?: Linter.RuleEntry<[]>;
|
|
401
|
+
/**
|
|
402
|
+
* Disallow unescaped HTML entities from appearing in markup
|
|
403
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md
|
|
404
|
+
*/
|
|
405
|
+
'react/no-unescaped-entities'?: Linter.RuleEntry<ReactNoUnescapedEntities>;
|
|
406
|
+
/**
|
|
407
|
+
* Disallow usage of unknown DOM property
|
|
408
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md
|
|
409
|
+
*/
|
|
410
|
+
'react/no-unknown-property'?: Linter.RuleEntry<ReactNoUnknownProperty>;
|
|
411
|
+
/**
|
|
412
|
+
* Disallow usage of unsafe lifecycle methods
|
|
413
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unsafe.md
|
|
414
|
+
*/
|
|
415
|
+
'react/no-unsafe'?: Linter.RuleEntry<ReactNoUnsafe>;
|
|
416
|
+
/**
|
|
417
|
+
* Disallow creating unstable components inside components
|
|
418
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unstable-nested-components.md
|
|
419
|
+
*/
|
|
420
|
+
'react/no-unstable-nested-components'?: Linter.RuleEntry<ReactNoUnstableNestedComponents>;
|
|
421
|
+
/**
|
|
422
|
+
* Disallow declaring unused methods of component class
|
|
423
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-class-component-methods.md
|
|
424
|
+
*/
|
|
425
|
+
'react/no-unused-class-component-methods'?: Linter.RuleEntry<[]>;
|
|
426
|
+
/**
|
|
427
|
+
* Disallow definitions of unused propTypes
|
|
428
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-prop-types.md
|
|
429
|
+
*/
|
|
430
|
+
'react/no-unused-prop-types'?: Linter.RuleEntry<ReactNoUnusedPropTypes>;
|
|
431
|
+
/**
|
|
432
|
+
* Disallow definitions of unused state
|
|
433
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-state.md
|
|
434
|
+
*/
|
|
435
|
+
'react/no-unused-state'?: Linter.RuleEntry<[]>;
|
|
436
|
+
/**
|
|
437
|
+
* Disallow usage of setState in componentWillUpdate
|
|
438
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-will-update-set-state.md
|
|
439
|
+
*/
|
|
440
|
+
'react/no-will-update-set-state'?: Linter.RuleEntry<ReactNoWillUpdateSetState>;
|
|
441
|
+
/**
|
|
442
|
+
* Enforce ES5 or ES6 class for React Components
|
|
443
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-es6-class.md
|
|
444
|
+
*/
|
|
445
|
+
'react/prefer-es6-class'?: Linter.RuleEntry<ReactPreferEs6Class>;
|
|
446
|
+
/**
|
|
447
|
+
* Prefer exact proptype definitions
|
|
448
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-exact-props.md
|
|
449
|
+
*/
|
|
450
|
+
'react/prefer-exact-props'?: Linter.RuleEntry<[]>;
|
|
451
|
+
/**
|
|
452
|
+
* Enforce that props are read-only
|
|
453
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-read-only-props.md
|
|
454
|
+
*/
|
|
455
|
+
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
|
|
456
|
+
/**
|
|
457
|
+
* Enforce stateless components to be written as a pure function
|
|
458
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-stateless-function.md
|
|
459
|
+
*/
|
|
460
|
+
'react/prefer-stateless-function'?: Linter.RuleEntry<ReactPreferStatelessFunction>;
|
|
461
|
+
/**
|
|
462
|
+
* Disallow missing props validation in a React component definition
|
|
463
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prop-types.md
|
|
464
|
+
*/
|
|
465
|
+
'react/prop-types'?: Linter.RuleEntry<ReactPropTypes>;
|
|
466
|
+
/**
|
|
467
|
+
* Disallow missing React when using JSX
|
|
468
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md
|
|
469
|
+
*/
|
|
470
|
+
'react/react-in-jsx-scope'?: Linter.RuleEntry<[]>;
|
|
471
|
+
/**
|
|
472
|
+
* Enforce a defaultProps definition for every prop that is not a required prop
|
|
473
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-default-props.md
|
|
474
|
+
*/
|
|
475
|
+
'react/require-default-props'?: Linter.RuleEntry<ReactRequireDefaultProps>;
|
|
476
|
+
/**
|
|
477
|
+
* Enforce React components to have a shouldComponentUpdate method
|
|
478
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-optimization.md
|
|
479
|
+
*/
|
|
480
|
+
'react/require-optimization'?: Linter.RuleEntry<ReactRequireOptimization>;
|
|
481
|
+
/**
|
|
482
|
+
* Enforce ES5 or ES6 class for returning value in render function
|
|
483
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md
|
|
484
|
+
*/
|
|
485
|
+
'react/require-render-return'?: Linter.RuleEntry<[]>;
|
|
486
|
+
/**
|
|
487
|
+
* Disallow extra closing tags for components without children
|
|
488
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/self-closing-comp.md
|
|
489
|
+
*/
|
|
490
|
+
'react/self-closing-comp'?: Linter.RuleEntry<ReactSelfClosingComp>;
|
|
491
|
+
/**
|
|
492
|
+
* Enforce component methods order
|
|
493
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-comp.md
|
|
494
|
+
*/
|
|
495
|
+
'react/sort-comp'?: Linter.RuleEntry<ReactSortComp>;
|
|
496
|
+
/**
|
|
497
|
+
* Enforce defaultProps declarations alphabetical sorting
|
|
498
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-default-props.md
|
|
499
|
+
*/
|
|
500
|
+
'react/sort-default-props'?: Linter.RuleEntry<ReactSortDefaultProps>;
|
|
501
|
+
/**
|
|
502
|
+
* Enforce propTypes declarations alphabetical sorting
|
|
503
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-prop-types.md
|
|
504
|
+
*/
|
|
505
|
+
'react/sort-prop-types'?: Linter.RuleEntry<ReactSortPropTypes>;
|
|
506
|
+
/**
|
|
507
|
+
* Enforce class component state initialization style
|
|
508
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/state-in-constructor.md
|
|
509
|
+
*/
|
|
510
|
+
'react/state-in-constructor'?: Linter.RuleEntry<ReactStateInConstructor>;
|
|
511
|
+
/**
|
|
512
|
+
* Enforces where React component static properties should be positioned.
|
|
513
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/static-property-placement.md
|
|
514
|
+
*/
|
|
515
|
+
'react/static-property-placement'?: Linter.RuleEntry<ReactStaticPropertyPlacement>;
|
|
516
|
+
/**
|
|
517
|
+
* Enforce style prop value is an object
|
|
518
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/style-prop-object.md
|
|
519
|
+
*/
|
|
520
|
+
'react/style-prop-object'?: Linter.RuleEntry<ReactStylePropObject>;
|
|
521
|
+
/**
|
|
522
|
+
* Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children
|
|
523
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md
|
|
524
|
+
*/
|
|
525
|
+
'react/void-dom-elements-no-children'?: Linter.RuleEntry<[]>;
|
|
526
|
+
}
|
|
527
|
+
type ReactHooksExhaustiveDeps = [] | [
|
|
528
|
+
{
|
|
529
|
+
additionalHooks?: string;
|
|
530
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
531
|
+
}
|
|
532
|
+
];
|
|
533
|
+
type ReactRefreshOnlyExportComponents = [] | [
|
|
534
|
+
{
|
|
535
|
+
allowConstantExport?: boolean;
|
|
536
|
+
checkJS?: boolean;
|
|
537
|
+
allowExportNames?: string[];
|
|
538
|
+
}
|
|
539
|
+
];
|
|
540
|
+
type ReactBooleanPropNaming = [] | [
|
|
541
|
+
{
|
|
542
|
+
propTypeNames?: [string, ...(string)[]];
|
|
543
|
+
rule?: string;
|
|
544
|
+
message?: string;
|
|
545
|
+
validateNested?: boolean;
|
|
546
|
+
}
|
|
547
|
+
];
|
|
548
|
+
type ReactButtonHasType = [] | [
|
|
549
|
+
{
|
|
550
|
+
button?: boolean;
|
|
551
|
+
submit?: boolean;
|
|
552
|
+
reset?: boolean;
|
|
553
|
+
}
|
|
554
|
+
];
|
|
555
|
+
type ReactCheckedRequiresOnchangeOrReadonly = [] | [
|
|
556
|
+
{
|
|
557
|
+
ignoreMissingProperties?: boolean;
|
|
558
|
+
ignoreExclusiveCheckedAttribute?: boolean;
|
|
559
|
+
}
|
|
560
|
+
];
|
|
561
|
+
type ReactDefaultPropsMatchPropTypes = [] | [
|
|
562
|
+
{
|
|
563
|
+
allowRequiredDefaults?: boolean;
|
|
564
|
+
}
|
|
565
|
+
];
|
|
566
|
+
type ReactDestructuringAssignment = [] | [("always" | "never")] | [
|
|
567
|
+
("always" | "never"),
|
|
568
|
+
{
|
|
569
|
+
ignoreClassFields?: boolean;
|
|
570
|
+
destructureInSignature?: ("always" | "ignore");
|
|
571
|
+
}
|
|
572
|
+
];
|
|
573
|
+
type ReactDisplayName = [] | [
|
|
574
|
+
{
|
|
575
|
+
ignoreTranspilerName?: boolean;
|
|
576
|
+
checkContextObjects?: boolean;
|
|
577
|
+
}
|
|
578
|
+
];
|
|
579
|
+
type ReactForbidComponentProps = [] | [
|
|
580
|
+
{
|
|
581
|
+
forbid?: (string | {
|
|
582
|
+
propName?: string;
|
|
583
|
+
allowedFor?: string[];
|
|
584
|
+
message?: string;
|
|
585
|
+
} | {
|
|
586
|
+
propName?: string;
|
|
587
|
+
disallowedFor: [string, ...(string)[]];
|
|
588
|
+
message?: string;
|
|
589
|
+
} | {
|
|
590
|
+
propNamePattern?: string;
|
|
591
|
+
allowedFor?: string[];
|
|
592
|
+
message?: string;
|
|
593
|
+
} | {
|
|
594
|
+
propNamePattern?: string;
|
|
595
|
+
disallowedFor: [string, ...(string)[]];
|
|
596
|
+
message?: string;
|
|
597
|
+
})[];
|
|
598
|
+
[k: string]: unknown | undefined;
|
|
599
|
+
}
|
|
600
|
+
];
|
|
601
|
+
type ReactForbidDomProps = [] | [
|
|
602
|
+
{
|
|
603
|
+
forbid?: (string | {
|
|
604
|
+
propName?: string;
|
|
605
|
+
disallowedFor?: string[];
|
|
606
|
+
message?: string;
|
|
607
|
+
[k: string]: unknown | undefined;
|
|
608
|
+
})[];
|
|
609
|
+
}
|
|
610
|
+
];
|
|
611
|
+
type ReactForbidElements = [] | [
|
|
612
|
+
{
|
|
613
|
+
forbid?: (string | {
|
|
614
|
+
element: string;
|
|
615
|
+
message?: string;
|
|
616
|
+
})[];
|
|
617
|
+
}
|
|
618
|
+
];
|
|
619
|
+
type ReactForbidForeignPropTypes = [] | [
|
|
620
|
+
{
|
|
621
|
+
allowInPropTypes?: boolean;
|
|
622
|
+
}
|
|
623
|
+
];
|
|
624
|
+
type ReactForbidPropTypes = [] | [
|
|
625
|
+
{
|
|
626
|
+
forbid?: string[];
|
|
627
|
+
checkContextTypes?: boolean;
|
|
628
|
+
checkChildContextTypes?: boolean;
|
|
629
|
+
[k: string]: unknown | undefined;
|
|
630
|
+
}
|
|
631
|
+
];
|
|
632
|
+
type ReactFunctionComponentDefinition = [] | [
|
|
633
|
+
{
|
|
634
|
+
namedComponents?: (("function-declaration" | "arrow-function" | "function-expression") | ("function-declaration" | "arrow-function" | "function-expression")[]);
|
|
635
|
+
unnamedComponents?: (("arrow-function" | "function-expression") | ("arrow-function" | "function-expression")[]);
|
|
636
|
+
[k: string]: unknown | undefined;
|
|
637
|
+
}
|
|
638
|
+
];
|
|
639
|
+
type ReactHookUseState = [] | [
|
|
640
|
+
{
|
|
641
|
+
allowDestructuredState?: boolean;
|
|
642
|
+
}
|
|
643
|
+
];
|
|
644
|
+
type ReactJsxBooleanValue = ([] | [("always" | "never")] | [] | ["always"] | [
|
|
645
|
+
"always",
|
|
646
|
+
{
|
|
647
|
+
never?: string[];
|
|
648
|
+
assumeUndefinedIsFalse?: boolean;
|
|
649
|
+
}
|
|
650
|
+
] | [] | ["never"] | [
|
|
651
|
+
"never",
|
|
652
|
+
{
|
|
653
|
+
always?: string[];
|
|
654
|
+
assumeUndefinedIsFalse?: boolean;
|
|
655
|
+
}
|
|
656
|
+
]);
|
|
657
|
+
type ReactJsxClosingBracketLocation = [] | [
|
|
658
|
+
(("after-props" | "props-aligned" | "tag-aligned" | "line-aligned") | {
|
|
659
|
+
location?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned");
|
|
660
|
+
} | {
|
|
661
|
+
nonEmpty?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned" | false);
|
|
662
|
+
selfClosing?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned" | false);
|
|
663
|
+
})
|
|
664
|
+
];
|
|
665
|
+
type ReactJsxClosingTagLocation = [] | [
|
|
666
|
+
(("tag-aligned" | "line-aligned") | {
|
|
667
|
+
location?: ("tag-aligned" | "line-aligned");
|
|
668
|
+
})
|
|
669
|
+
];
|
|
670
|
+
type ReactJsxCurlyBracePresence = [] | [
|
|
671
|
+
({
|
|
672
|
+
props?: ("always" | "never" | "ignore");
|
|
673
|
+
children?: ("always" | "never" | "ignore");
|
|
674
|
+
propElementValues?: ("always" | "never" | "ignore");
|
|
675
|
+
} | ("always" | "never" | "ignore"))
|
|
676
|
+
];
|
|
677
|
+
type ReactJsxCurlyNewline = [] | [
|
|
678
|
+
(("consistent" | "never") | {
|
|
679
|
+
singleline?: ("consistent" | "require" | "forbid");
|
|
680
|
+
multiline?: ("consistent" | "require" | "forbid");
|
|
681
|
+
})
|
|
682
|
+
];
|
|
683
|
+
type ReactJsxCurlySpacing = [] | [
|
|
684
|
+
((_ReactJsxCurlySpacing_BasicConfig & {
|
|
685
|
+
attributes?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
|
|
686
|
+
children?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
|
|
687
|
+
[k: string]: unknown | undefined;
|
|
688
|
+
}) | ("always" | "never"))
|
|
689
|
+
] | [
|
|
690
|
+
((_ReactJsxCurlySpacing_BasicConfig & {
|
|
691
|
+
attributes?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
|
|
692
|
+
children?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
|
|
693
|
+
[k: string]: unknown | undefined;
|
|
694
|
+
}) | ("always" | "never")),
|
|
695
|
+
{
|
|
696
|
+
allowMultiline?: boolean;
|
|
697
|
+
spacing?: {
|
|
698
|
+
objectLiterals?: ("always" | "never");
|
|
699
|
+
[k: string]: unknown | undefined;
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
];
|
|
703
|
+
type _ReactJsxCurlySpacingBasicConfigOrBoolean = (_ReactJsxCurlySpacing_BasicConfig | boolean);
|
|
704
|
+
interface _ReactJsxCurlySpacing_BasicConfig {
|
|
705
|
+
when?: ("always" | "never");
|
|
706
|
+
allowMultiline?: boolean;
|
|
707
|
+
spacing?: {
|
|
708
|
+
objectLiterals?: ("always" | "never");
|
|
709
|
+
[k: string]: unknown | undefined;
|
|
710
|
+
};
|
|
711
|
+
[k: string]: unknown | undefined;
|
|
712
|
+
}
|
|
713
|
+
type ReactJsxEqualsSpacing = [] | [("always" | "never")];
|
|
714
|
+
type ReactJsxFilenameExtension = [] | [
|
|
715
|
+
{
|
|
716
|
+
allow?: ("always" | "as-needed");
|
|
717
|
+
extensions?: string[];
|
|
718
|
+
ignoreFilesWithoutCode?: boolean;
|
|
719
|
+
}
|
|
720
|
+
];
|
|
721
|
+
type ReactJsxFirstPropNewLine = [] | [("always" | "never" | "multiline" | "multiline-multiprop" | "multiprop")];
|
|
722
|
+
type ReactJsxFragments = [] | [("syntax" | "element")];
|
|
723
|
+
type ReactJsxHandlerNames = [] | [
|
|
724
|
+
({
|
|
725
|
+
eventHandlerPrefix?: string;
|
|
726
|
+
eventHandlerPropPrefix?: string;
|
|
727
|
+
checkLocalVariables?: boolean;
|
|
728
|
+
checkInlineFunction?: boolean;
|
|
729
|
+
ignoreComponentNames?: string[];
|
|
730
|
+
} | {
|
|
731
|
+
eventHandlerPrefix?: string;
|
|
732
|
+
eventHandlerPropPrefix?: false;
|
|
733
|
+
checkLocalVariables?: boolean;
|
|
734
|
+
checkInlineFunction?: boolean;
|
|
735
|
+
ignoreComponentNames?: string[];
|
|
736
|
+
} | {
|
|
737
|
+
eventHandlerPrefix?: false;
|
|
738
|
+
eventHandlerPropPrefix?: string;
|
|
739
|
+
checkLocalVariables?: boolean;
|
|
740
|
+
checkInlineFunction?: boolean;
|
|
741
|
+
ignoreComponentNames?: string[];
|
|
742
|
+
} | {
|
|
743
|
+
checkLocalVariables?: boolean;
|
|
744
|
+
} | {
|
|
745
|
+
checkInlineFunction?: boolean;
|
|
746
|
+
} | {
|
|
747
|
+
ignoreComponentNames?: string[];
|
|
748
|
+
[k: string]: unknown | undefined;
|
|
749
|
+
})
|
|
750
|
+
];
|
|
751
|
+
type ReactJsxIndent = [] | [("tab" | number)] | [
|
|
752
|
+
("tab" | number),
|
|
753
|
+
{
|
|
754
|
+
checkAttributes?: boolean;
|
|
755
|
+
indentLogicalExpressions?: boolean;
|
|
756
|
+
}
|
|
757
|
+
];
|
|
758
|
+
type ReactJsxIndentProps = [] | [
|
|
759
|
+
(("tab" | "first") | number | {
|
|
760
|
+
indentMode?: (("tab" | "first") | number);
|
|
761
|
+
ignoreTernaryOperator?: boolean;
|
|
762
|
+
[k: string]: unknown | undefined;
|
|
763
|
+
})
|
|
764
|
+
];
|
|
765
|
+
type ReactJsxKey = [] | [
|
|
766
|
+
{
|
|
767
|
+
checkFragmentShorthand?: boolean;
|
|
768
|
+
checkKeyMustBeforeSpread?: boolean;
|
|
769
|
+
warnOnDuplicates?: boolean;
|
|
770
|
+
}
|
|
771
|
+
];
|
|
772
|
+
type ReactJsxMaxDepth = [] | [
|
|
773
|
+
{
|
|
774
|
+
max?: number;
|
|
775
|
+
}
|
|
776
|
+
];
|
|
777
|
+
type ReactJsxMaxPropsPerLine = [] | [
|
|
778
|
+
({
|
|
779
|
+
maximum?: {
|
|
780
|
+
single?: number;
|
|
781
|
+
multi?: number;
|
|
782
|
+
[k: string]: unknown | undefined;
|
|
783
|
+
};
|
|
784
|
+
} | {
|
|
785
|
+
maximum?: number;
|
|
786
|
+
when?: ("always" | "multiline");
|
|
787
|
+
})
|
|
788
|
+
];
|
|
789
|
+
type ReactJsxNewline = [] | [
|
|
790
|
+
{
|
|
791
|
+
prevent?: boolean;
|
|
792
|
+
allowMultilines?: boolean;
|
|
793
|
+
}
|
|
794
|
+
];
|
|
795
|
+
type ReactJsxNoBind = [] | [
|
|
796
|
+
{
|
|
797
|
+
allowArrowFunctions?: boolean;
|
|
798
|
+
allowBind?: boolean;
|
|
799
|
+
allowFunctions?: boolean;
|
|
800
|
+
ignoreRefs?: boolean;
|
|
801
|
+
ignoreDOMComponents?: boolean;
|
|
802
|
+
}
|
|
803
|
+
];
|
|
804
|
+
type ReactJsxNoDuplicateProps = [] | [
|
|
805
|
+
{
|
|
806
|
+
ignoreCase?: boolean;
|
|
807
|
+
}
|
|
808
|
+
];
|
|
809
|
+
type ReactJsxNoLeakedRender = [] | [
|
|
810
|
+
{
|
|
811
|
+
validStrategies?: ("ternary" | "coerce")[];
|
|
812
|
+
}
|
|
813
|
+
];
|
|
814
|
+
type ReactJsxNoLiterals = [] | [
|
|
815
|
+
{
|
|
816
|
+
noStrings?: boolean;
|
|
817
|
+
allowedStrings?: string[];
|
|
818
|
+
ignoreProps?: boolean;
|
|
819
|
+
noAttributeStrings?: boolean;
|
|
820
|
+
}
|
|
821
|
+
];
|
|
822
|
+
type ReactJsxNoScriptUrl = ([] | [
|
|
823
|
+
{
|
|
824
|
+
name: string;
|
|
825
|
+
props: string[];
|
|
826
|
+
}[]
|
|
827
|
+
] | [
|
|
828
|
+
{
|
|
829
|
+
name: string;
|
|
830
|
+
props: string[];
|
|
831
|
+
}[],
|
|
832
|
+
{
|
|
833
|
+
includeFromSettings?: boolean;
|
|
834
|
+
[k: string]: unknown | undefined;
|
|
835
|
+
}
|
|
836
|
+
] | [] | [
|
|
837
|
+
{
|
|
838
|
+
includeFromSettings?: boolean;
|
|
839
|
+
[k: string]: unknown | undefined;
|
|
840
|
+
}
|
|
841
|
+
]);
|
|
842
|
+
type ReactJsxNoTargetBlank = [] | [
|
|
843
|
+
{
|
|
844
|
+
allowReferrer?: boolean;
|
|
845
|
+
enforceDynamicLinks?: ("always" | "never");
|
|
846
|
+
warnOnSpreadAttributes?: boolean;
|
|
847
|
+
links?: boolean;
|
|
848
|
+
forms?: boolean;
|
|
849
|
+
}
|
|
850
|
+
];
|
|
851
|
+
type ReactJsxNoUndef = [] | [
|
|
852
|
+
{
|
|
853
|
+
allowGlobals?: boolean;
|
|
854
|
+
}
|
|
855
|
+
];
|
|
856
|
+
type ReactJsxNoUselessFragment = [] | [
|
|
857
|
+
{
|
|
858
|
+
allowExpressions?: boolean;
|
|
859
|
+
[k: string]: unknown | undefined;
|
|
860
|
+
}
|
|
861
|
+
];
|
|
862
|
+
type ReactJsxOneExpressionPerLine = [] | [
|
|
863
|
+
{
|
|
864
|
+
allow?: ("none" | "literal" | "single-child" | "non-jsx");
|
|
865
|
+
}
|
|
866
|
+
];
|
|
867
|
+
type ReactJsxPascalCase = [] | [
|
|
868
|
+
{
|
|
869
|
+
allowAllCaps?: boolean;
|
|
870
|
+
allowLeadingUnderscore?: boolean;
|
|
871
|
+
allowNamespace?: boolean;
|
|
872
|
+
ignore?: [] | [string];
|
|
873
|
+
}
|
|
874
|
+
];
|
|
875
|
+
type ReactJsxPropsNoSpreading = [] | [
|
|
876
|
+
({
|
|
877
|
+
html?: ("enforce" | "ignore");
|
|
878
|
+
custom?: ("enforce" | "ignore");
|
|
879
|
+
exceptions?: string[];
|
|
880
|
+
[k: string]: unknown | undefined;
|
|
881
|
+
} & {
|
|
882
|
+
[k: string]: unknown | undefined;
|
|
883
|
+
})
|
|
884
|
+
];
|
|
885
|
+
type ReactJsxSortDefaultProps = [] | [
|
|
886
|
+
{
|
|
887
|
+
ignoreCase?: boolean;
|
|
888
|
+
}
|
|
889
|
+
];
|
|
890
|
+
type ReactJsxSortProps = [] | [
|
|
891
|
+
{
|
|
892
|
+
callbacksLast?: boolean;
|
|
893
|
+
shorthandFirst?: boolean;
|
|
894
|
+
shorthandLast?: boolean;
|
|
895
|
+
multiline?: ("ignore" | "first" | "last");
|
|
896
|
+
ignoreCase?: boolean;
|
|
897
|
+
noSortAlphabetically?: boolean;
|
|
898
|
+
reservedFirst?: (unknown[] | boolean);
|
|
899
|
+
locale?: string;
|
|
900
|
+
}
|
|
901
|
+
];
|
|
902
|
+
type ReactJsxSpaceBeforeClosing = [] | [("always" | "never")];
|
|
903
|
+
type ReactJsxTagSpacing = [] | [
|
|
904
|
+
{
|
|
905
|
+
closingSlash?: ("always" | "never" | "allow");
|
|
906
|
+
beforeSelfClosing?: ("always" | "proportional-always" | "never" | "allow");
|
|
907
|
+
afterOpening?: ("always" | "allow-multiline" | "never" | "allow");
|
|
908
|
+
beforeClosing?: ("always" | "proportional-always" | "never" | "allow");
|
|
909
|
+
}
|
|
910
|
+
];
|
|
911
|
+
type ReactJsxWrapMultilines = [] | [
|
|
912
|
+
{
|
|
913
|
+
declaration?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
|
|
914
|
+
assignment?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
|
|
915
|
+
return?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
|
|
916
|
+
arrow?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
|
|
917
|
+
condition?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
|
|
918
|
+
logical?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
|
|
919
|
+
prop?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
|
|
920
|
+
}
|
|
921
|
+
];
|
|
922
|
+
type ReactNoChildrenProp = [] | [
|
|
923
|
+
{
|
|
924
|
+
allowFunctions?: boolean;
|
|
925
|
+
}
|
|
926
|
+
];
|
|
927
|
+
type ReactNoDanger = [] | [
|
|
928
|
+
{
|
|
929
|
+
customComponentNames?: string[];
|
|
930
|
+
[k: string]: unknown | undefined;
|
|
931
|
+
}
|
|
932
|
+
];
|
|
933
|
+
type ReactNoDidMountSetState = [] | ["disallow-in-func"];
|
|
934
|
+
type ReactNoDidUpdateSetState = [] | ["disallow-in-func"];
|
|
935
|
+
type ReactNoInvalidHtmlAttribute = [] | [("rel")[]];
|
|
936
|
+
type ReactNoMultiComp = [] | [
|
|
937
|
+
{
|
|
938
|
+
ignoreStateless?: boolean;
|
|
939
|
+
}
|
|
940
|
+
];
|
|
941
|
+
type ReactNoStringRefs = [] | [
|
|
942
|
+
{
|
|
943
|
+
noTemplateLiterals?: boolean;
|
|
944
|
+
}
|
|
945
|
+
];
|
|
946
|
+
type ReactNoUnescapedEntities = [] | [
|
|
947
|
+
{
|
|
948
|
+
forbid?: (string | {
|
|
949
|
+
char?: string;
|
|
950
|
+
alternatives?: string[];
|
|
951
|
+
[k: string]: unknown | undefined;
|
|
952
|
+
})[];
|
|
953
|
+
}
|
|
954
|
+
];
|
|
955
|
+
type ReactNoUnknownProperty = [] | [
|
|
956
|
+
{
|
|
957
|
+
ignore?: string[];
|
|
958
|
+
requireDataLowercase?: boolean;
|
|
959
|
+
}
|
|
960
|
+
];
|
|
961
|
+
type ReactNoUnsafe = [] | [
|
|
962
|
+
{
|
|
963
|
+
checkAliases?: boolean;
|
|
964
|
+
}
|
|
965
|
+
];
|
|
966
|
+
type ReactNoUnstableNestedComponents = [] | [
|
|
967
|
+
{
|
|
968
|
+
customValidators?: string[];
|
|
969
|
+
allowAsProps?: boolean;
|
|
970
|
+
}
|
|
971
|
+
];
|
|
972
|
+
type ReactNoUnusedPropTypes = [] | [
|
|
973
|
+
{
|
|
974
|
+
ignore?: string[];
|
|
975
|
+
customValidators?: string[];
|
|
976
|
+
skipShapeProps?: boolean;
|
|
977
|
+
}
|
|
978
|
+
];
|
|
979
|
+
type ReactNoWillUpdateSetState = [] | ["disallow-in-func"];
|
|
980
|
+
type ReactPreferEs6Class = [] | [("always" | "never")];
|
|
981
|
+
type ReactPreferStatelessFunction = [] | [
|
|
982
|
+
{
|
|
983
|
+
ignorePureComponents?: boolean;
|
|
984
|
+
}
|
|
985
|
+
];
|
|
986
|
+
type ReactPropTypes = [] | [
|
|
987
|
+
{
|
|
988
|
+
ignore?: string[];
|
|
989
|
+
customValidators?: string[];
|
|
990
|
+
skipUndeclared?: boolean;
|
|
991
|
+
}
|
|
992
|
+
];
|
|
993
|
+
type ReactRequireDefaultProps = [] | [
|
|
994
|
+
{
|
|
995
|
+
forbidDefaultForRequired?: boolean;
|
|
996
|
+
classes?: ("defaultProps" | "ignore");
|
|
997
|
+
functions?: ("defaultArguments" | "defaultProps" | "ignore");
|
|
998
|
+
ignoreFunctionalComponents?: boolean;
|
|
999
|
+
}
|
|
1000
|
+
];
|
|
1001
|
+
type ReactRequireOptimization = [] | [
|
|
1002
|
+
{
|
|
1003
|
+
allowDecorators?: string[];
|
|
1004
|
+
}
|
|
1005
|
+
];
|
|
1006
|
+
type ReactSelfClosingComp = [] | [
|
|
1007
|
+
{
|
|
1008
|
+
component?: boolean;
|
|
1009
|
+
html?: boolean;
|
|
1010
|
+
}
|
|
1011
|
+
];
|
|
1012
|
+
type ReactSortComp = [] | [
|
|
1013
|
+
{
|
|
1014
|
+
order?: string[];
|
|
1015
|
+
groups?: {
|
|
1016
|
+
[k: string]: string[];
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
];
|
|
1020
|
+
type ReactSortDefaultProps = [] | [
|
|
1021
|
+
{
|
|
1022
|
+
ignoreCase?: boolean;
|
|
1023
|
+
}
|
|
1024
|
+
];
|
|
1025
|
+
type ReactSortPropTypes = [] | [
|
|
1026
|
+
{
|
|
1027
|
+
requiredFirst?: boolean;
|
|
1028
|
+
callbacksLast?: boolean;
|
|
1029
|
+
ignoreCase?: boolean;
|
|
1030
|
+
noSortAlphabetically?: boolean;
|
|
1031
|
+
sortShapeProp?: boolean;
|
|
1032
|
+
checkTypes?: boolean;
|
|
1033
|
+
}
|
|
1034
|
+
];
|
|
1035
|
+
type ReactStateInConstructor = [] | [("always" | "never")];
|
|
1036
|
+
type ReactStaticPropertyPlacement = [] | [("static public field" | "static getter" | "property assignment")] | [
|
|
1037
|
+
("static public field" | "static getter" | "property assignment"),
|
|
1038
|
+
{
|
|
1039
|
+
propTypes?: ("static public field" | "static getter" | "property assignment");
|
|
1040
|
+
defaultProps?: ("static public field" | "static getter" | "property assignment");
|
|
1041
|
+
childContextTypes?: ("static public field" | "static getter" | "property assignment");
|
|
1042
|
+
contextTypes?: ("static public field" | "static getter" | "property assignment");
|
|
1043
|
+
contextType?: ("static public field" | "static getter" | "property assignment");
|
|
1044
|
+
displayName?: ("static public field" | "static getter" | "property assignment");
|
|
1045
|
+
}
|
|
1046
|
+
];
|
|
1047
|
+
type ReactStylePropObject = [] | [
|
|
1048
|
+
{
|
|
1049
|
+
allow?: string[];
|
|
1050
|
+
[k: string]: unknown | undefined;
|
|
1051
|
+
}
|
|
1052
|
+
];
|
|
1053
|
+
export {};
|