@w5s/eslint-config 3.14.0 → 3.17.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/dist/index.d.ts +1941 -836
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +362 -16
- package/dist/index.js.map +1 -1
- package/package.json +15 -10
- package/src/config/jsx.ts +51 -0
- package/src/config/markdown.ts +1 -1
- package/src/config/react.ts +4 -2
- package/src/config/unused-imports.ts +51 -0
- package/src/config.ts +2 -0
- package/src/defineConfig.ts +22 -15
- package/src/glob.ts +2 -0
- package/src/typegen/jsonc.d.ts +4 -0
- package/src/typegen/jsx-a11y.d.ts +427 -0
- package/src/typegen/perfectionist.d.ts +181 -4
- package/src/typegen/react.d.ts +2 -2
- package/src/typegen/test.d.ts +3 -1
- package/src/typegen/ts.d.ts +1 -0
- package/src/typegen/unicorn.d.ts +374 -322
- package/src/typegen/unused-imports.d.ts +84 -0
- package/src/typegen/yml.d.ts +4 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
import type { Linter } from 'eslint'
|
|
4
|
+
|
|
5
|
+
declare module 'eslint' {
|
|
6
|
+
namespace Linter {
|
|
7
|
+
interface RulesRecord extends RuleOptions {}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface RuleOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Enforce emojis are wrapped in `<span>` and provide screen reader access.
|
|
14
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
17
|
+
'jsx-a11y/accessible-emoji'?: Linter.RuleEntry<JsxA11YAccessibleEmoji>
|
|
18
|
+
/**
|
|
19
|
+
* Enforce all elements that require alternative text have meaningful information to relay back to end user.
|
|
20
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md
|
|
21
|
+
*/
|
|
22
|
+
'jsx-a11y/alt-text'?: Linter.RuleEntry<JsxA11YAltText>
|
|
23
|
+
/**
|
|
24
|
+
* Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
|
|
25
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md
|
|
26
|
+
*/
|
|
27
|
+
'jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<JsxA11YAnchorAmbiguousText>
|
|
28
|
+
/**
|
|
29
|
+
* Enforce all anchors to contain accessible content.
|
|
30
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md
|
|
31
|
+
*/
|
|
32
|
+
'jsx-a11y/anchor-has-content'?: Linter.RuleEntry<JsxA11YAnchorHasContent>
|
|
33
|
+
/**
|
|
34
|
+
* Enforce all anchors are valid, navigable elements.
|
|
35
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md
|
|
36
|
+
*/
|
|
37
|
+
'jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<JsxA11YAnchorIsValid>
|
|
38
|
+
/**
|
|
39
|
+
* Enforce elements with aria-activedescendant are tabbable.
|
|
40
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md
|
|
41
|
+
*/
|
|
42
|
+
'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<JsxA11YAriaActivedescendantHasTabindex>
|
|
43
|
+
/**
|
|
44
|
+
* Enforce all `aria-*` props are valid.
|
|
45
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md
|
|
46
|
+
*/
|
|
47
|
+
'jsx-a11y/aria-props'?: Linter.RuleEntry<JsxA11YAriaProps>
|
|
48
|
+
/**
|
|
49
|
+
* Enforce ARIA state and property values are valid.
|
|
50
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md
|
|
51
|
+
*/
|
|
52
|
+
'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<JsxA11YAriaProptypes>
|
|
53
|
+
/**
|
|
54
|
+
* Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
|
|
55
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md
|
|
56
|
+
*/
|
|
57
|
+
'jsx-a11y/aria-role'?: Linter.RuleEntry<JsxA11YAriaRole>
|
|
58
|
+
/**
|
|
59
|
+
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
|
|
60
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md
|
|
61
|
+
*/
|
|
62
|
+
'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<JsxA11YAriaUnsupportedElements>
|
|
63
|
+
/**
|
|
64
|
+
* Enforce that autocomplete attributes are used correctly.
|
|
65
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md
|
|
66
|
+
*/
|
|
67
|
+
'jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<JsxA11YAutocompleteValid>
|
|
68
|
+
/**
|
|
69
|
+
* Enforce a clickable non-interactive element has at least one keyboard event listener.
|
|
70
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md
|
|
71
|
+
*/
|
|
72
|
+
'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<JsxA11YClickEventsHaveKeyEvents>
|
|
73
|
+
/**
|
|
74
|
+
* Enforce that a control (an interactive element) has a text label.
|
|
75
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md
|
|
76
|
+
*/
|
|
77
|
+
'jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<JsxA11YControlHasAssociatedLabel>
|
|
78
|
+
/**
|
|
79
|
+
* Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
|
|
80
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md
|
|
81
|
+
*/
|
|
82
|
+
'jsx-a11y/heading-has-content'?: Linter.RuleEntry<JsxA11YHeadingHasContent>
|
|
83
|
+
/**
|
|
84
|
+
* Enforce `<html>` element has `lang` prop.
|
|
85
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md
|
|
86
|
+
*/
|
|
87
|
+
'jsx-a11y/html-has-lang'?: Linter.RuleEntry<JsxA11YHtmlHasLang>
|
|
88
|
+
/**
|
|
89
|
+
* Enforce iframe elements have a title attribute.
|
|
90
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md
|
|
91
|
+
*/
|
|
92
|
+
'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<JsxA11YIframeHasTitle>
|
|
93
|
+
/**
|
|
94
|
+
* Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
|
|
95
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md
|
|
96
|
+
*/
|
|
97
|
+
'jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<JsxA11YImgRedundantAlt>
|
|
98
|
+
/**
|
|
99
|
+
* Enforce that elements with interactive handlers like `onClick` must be focusable.
|
|
100
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md
|
|
101
|
+
*/
|
|
102
|
+
'jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<JsxA11YInteractiveSupportsFocus>
|
|
103
|
+
/**
|
|
104
|
+
* Enforce that a `label` tag has a text label and an associated control.
|
|
105
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md
|
|
106
|
+
*/
|
|
107
|
+
'jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<JsxA11YLabelHasAssociatedControl>
|
|
108
|
+
/**
|
|
109
|
+
* Enforce that `<label>` elements have the `htmlFor` prop.
|
|
110
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md
|
|
111
|
+
* @deprecated
|
|
112
|
+
*/
|
|
113
|
+
'jsx-a11y/label-has-for'?: Linter.RuleEntry<JsxA11YLabelHasFor>
|
|
114
|
+
/**
|
|
115
|
+
* Enforce lang attribute has a valid value.
|
|
116
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md
|
|
117
|
+
*/
|
|
118
|
+
'jsx-a11y/lang'?: Linter.RuleEntry<JsxA11YLang>
|
|
119
|
+
/**
|
|
120
|
+
* Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
|
|
121
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md
|
|
122
|
+
*/
|
|
123
|
+
'jsx-a11y/media-has-caption'?: Linter.RuleEntry<JsxA11YMediaHasCaption>
|
|
124
|
+
/**
|
|
125
|
+
* Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
|
|
126
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md
|
|
127
|
+
*/
|
|
128
|
+
'jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<JsxA11YMouseEventsHaveKeyEvents>
|
|
129
|
+
/**
|
|
130
|
+
* Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader.
|
|
131
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md
|
|
132
|
+
*/
|
|
133
|
+
'jsx-a11y/no-access-key'?: Linter.RuleEntry<JsxA11YNoAccessKey>
|
|
134
|
+
/**
|
|
135
|
+
* Disallow `aria-hidden="true"` from being set on focusable elements.
|
|
136
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md
|
|
137
|
+
*/
|
|
138
|
+
'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<JsxA11YNoAriaHiddenOnFocusable>
|
|
139
|
+
/**
|
|
140
|
+
* Enforce autoFocus prop is not used.
|
|
141
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md
|
|
142
|
+
*/
|
|
143
|
+
'jsx-a11y/no-autofocus'?: Linter.RuleEntry<JsxA11YNoAutofocus>
|
|
144
|
+
/**
|
|
145
|
+
* Enforce distracting elements are not used.
|
|
146
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md
|
|
147
|
+
*/
|
|
148
|
+
'jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<JsxA11YNoDistractingElements>
|
|
149
|
+
/**
|
|
150
|
+
* Interactive elements should not be assigned non-interactive roles.
|
|
151
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md
|
|
152
|
+
*/
|
|
153
|
+
'jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<JsxA11YNoInteractiveElementToNoninteractiveRole>
|
|
154
|
+
/**
|
|
155
|
+
* Non-interactive elements should not be assigned mouse or keyboard event listeners.
|
|
156
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md
|
|
157
|
+
*/
|
|
158
|
+
'jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementInteractions>
|
|
159
|
+
/**
|
|
160
|
+
* Non-interactive elements should not be assigned interactive roles.
|
|
161
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md
|
|
162
|
+
*/
|
|
163
|
+
'jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementToInteractiveRole>
|
|
164
|
+
/**
|
|
165
|
+
* `tabIndex` should only be declared on interactive elements.
|
|
166
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md
|
|
167
|
+
*/
|
|
168
|
+
'jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<JsxA11YNoNoninteractiveTabindex>
|
|
169
|
+
/**
|
|
170
|
+
* Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
|
|
171
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md
|
|
172
|
+
* @deprecated
|
|
173
|
+
*/
|
|
174
|
+
'jsx-a11y/no-onchange'?: Linter.RuleEntry<JsxA11YNoOnchange>
|
|
175
|
+
/**
|
|
176
|
+
* Enforce explicit role property is not the same as implicit/default role property on element.
|
|
177
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md
|
|
178
|
+
*/
|
|
179
|
+
'jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<JsxA11YNoRedundantRoles>
|
|
180
|
+
/**
|
|
181
|
+
* Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.
|
|
182
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md
|
|
183
|
+
*/
|
|
184
|
+
'jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<JsxA11YNoStaticElementInteractions>
|
|
185
|
+
/**
|
|
186
|
+
* Enforces using semantic DOM elements over the ARIA `role` property.
|
|
187
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md
|
|
188
|
+
*/
|
|
189
|
+
'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<JsxA11YPreferTagOverRole>
|
|
190
|
+
/**
|
|
191
|
+
* Enforce that elements with ARIA roles must have all required attributes for that role.
|
|
192
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md
|
|
193
|
+
*/
|
|
194
|
+
'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<JsxA11YRoleHasRequiredAriaProps>
|
|
195
|
+
/**
|
|
196
|
+
* Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
|
|
197
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md
|
|
198
|
+
*/
|
|
199
|
+
'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<JsxA11YRoleSupportsAriaProps>
|
|
200
|
+
/**
|
|
201
|
+
* Enforce `scope` prop is only used on `<th>` elements.
|
|
202
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md
|
|
203
|
+
*/
|
|
204
|
+
'jsx-a11y/scope'?: Linter.RuleEntry<JsxA11YScope>
|
|
205
|
+
/**
|
|
206
|
+
* Enforce `tabIndex` value is not greater than zero.
|
|
207
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md
|
|
208
|
+
*/
|
|
209
|
+
'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<JsxA11YTabindexNoPositive>
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* ======= Declarations ======= */
|
|
213
|
+
// ----- jsx-a11y/accessible-emoji -----
|
|
214
|
+
type JsxA11YAccessibleEmoji = []|[{
|
|
215
|
+
[k: string]: unknown | undefined
|
|
216
|
+
}]
|
|
217
|
+
// ----- jsx-a11y/alt-text -----
|
|
218
|
+
type JsxA11YAltText = []|[{
|
|
219
|
+
elements?: string[]
|
|
220
|
+
img?: string[]
|
|
221
|
+
object?: string[]
|
|
222
|
+
area?: string[]
|
|
223
|
+
"input[type=\"image\"]"?: string[]
|
|
224
|
+
[k: string]: unknown | undefined
|
|
225
|
+
}]
|
|
226
|
+
// ----- jsx-a11y/anchor-ambiguous-text -----
|
|
227
|
+
type JsxA11YAnchorAmbiguousText = []|[{
|
|
228
|
+
words?: string[]
|
|
229
|
+
[k: string]: unknown | undefined
|
|
230
|
+
}]
|
|
231
|
+
// ----- jsx-a11y/anchor-has-content -----
|
|
232
|
+
type JsxA11YAnchorHasContent = []|[{
|
|
233
|
+
components?: string[]
|
|
234
|
+
[k: string]: unknown | undefined
|
|
235
|
+
}]
|
|
236
|
+
// ----- jsx-a11y/anchor-is-valid -----
|
|
237
|
+
type JsxA11YAnchorIsValid = []|[{
|
|
238
|
+
components?: string[]
|
|
239
|
+
specialLink?: string[]
|
|
240
|
+
|
|
241
|
+
aspects?: [("noHref" | "invalidHref" | "preferButton"), ...(("noHref" | "invalidHref" | "preferButton"))[]]
|
|
242
|
+
[k: string]: unknown | undefined
|
|
243
|
+
}]
|
|
244
|
+
// ----- jsx-a11y/aria-activedescendant-has-tabindex -----
|
|
245
|
+
type JsxA11YAriaActivedescendantHasTabindex = []|[{
|
|
246
|
+
[k: string]: unknown | undefined
|
|
247
|
+
}]
|
|
248
|
+
// ----- jsx-a11y/aria-props -----
|
|
249
|
+
type JsxA11YAriaProps = []|[{
|
|
250
|
+
[k: string]: unknown | undefined
|
|
251
|
+
}]
|
|
252
|
+
// ----- jsx-a11y/aria-proptypes -----
|
|
253
|
+
type JsxA11YAriaProptypes = []|[{
|
|
254
|
+
[k: string]: unknown | undefined
|
|
255
|
+
}]
|
|
256
|
+
// ----- jsx-a11y/aria-role -----
|
|
257
|
+
type JsxA11YAriaRole = []|[{
|
|
258
|
+
allowedInvalidRoles?: string[]
|
|
259
|
+
ignoreNonDOM?: boolean
|
|
260
|
+
[k: string]: unknown | undefined
|
|
261
|
+
}]
|
|
262
|
+
// ----- jsx-a11y/aria-unsupported-elements -----
|
|
263
|
+
type JsxA11YAriaUnsupportedElements = []|[{
|
|
264
|
+
[k: string]: unknown | undefined
|
|
265
|
+
}]
|
|
266
|
+
// ----- jsx-a11y/autocomplete-valid -----
|
|
267
|
+
type JsxA11YAutocompleteValid = []|[{
|
|
268
|
+
inputComponents?: string[]
|
|
269
|
+
[k: string]: unknown | undefined
|
|
270
|
+
}]
|
|
271
|
+
// ----- jsx-a11y/click-events-have-key-events -----
|
|
272
|
+
type JsxA11YClickEventsHaveKeyEvents = []|[{
|
|
273
|
+
[k: string]: unknown | undefined
|
|
274
|
+
}]
|
|
275
|
+
// ----- jsx-a11y/control-has-associated-label -----
|
|
276
|
+
type JsxA11YControlHasAssociatedLabel = []|[{
|
|
277
|
+
labelAttributes?: string[]
|
|
278
|
+
controlComponents?: string[]
|
|
279
|
+
ignoreElements?: string[]
|
|
280
|
+
ignoreRoles?: string[]
|
|
281
|
+
|
|
282
|
+
depth?: number
|
|
283
|
+
[k: string]: unknown | undefined
|
|
284
|
+
}]
|
|
285
|
+
// ----- jsx-a11y/heading-has-content -----
|
|
286
|
+
type JsxA11YHeadingHasContent = []|[{
|
|
287
|
+
components?: string[]
|
|
288
|
+
[k: string]: unknown | undefined
|
|
289
|
+
}]
|
|
290
|
+
// ----- jsx-a11y/html-has-lang -----
|
|
291
|
+
type JsxA11YHtmlHasLang = []|[{
|
|
292
|
+
[k: string]: unknown | undefined
|
|
293
|
+
}]
|
|
294
|
+
// ----- jsx-a11y/iframe-has-title -----
|
|
295
|
+
type JsxA11YIframeHasTitle = []|[{
|
|
296
|
+
[k: string]: unknown | undefined
|
|
297
|
+
}]
|
|
298
|
+
// ----- jsx-a11y/img-redundant-alt -----
|
|
299
|
+
type JsxA11YImgRedundantAlt = []|[{
|
|
300
|
+
components?: string[]
|
|
301
|
+
words?: string[]
|
|
302
|
+
[k: string]: unknown | undefined
|
|
303
|
+
}]
|
|
304
|
+
// ----- jsx-a11y/interactive-supports-focus -----
|
|
305
|
+
type JsxA11YInteractiveSupportsFocus = []|[{
|
|
306
|
+
|
|
307
|
+
tabbable?: ("button" | "checkbox" | "columnheader" | "combobox" | "grid" | "gridcell" | "link" | "listbox" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "option" | "progressbar" | "radio" | "radiogroup" | "row" | "rowheader" | "scrollbar" | "searchbox" | "slider" | "spinbutton" | "switch" | "tab" | "tablist" | "textbox" | "tree" | "treegrid" | "treeitem" | "doc-backlink" | "doc-biblioref" | "doc-glossref" | "doc-noteref")[]
|
|
308
|
+
[k: string]: unknown | undefined
|
|
309
|
+
}]
|
|
310
|
+
// ----- jsx-a11y/label-has-associated-control -----
|
|
311
|
+
type JsxA11YLabelHasAssociatedControl = []|[{
|
|
312
|
+
labelComponents?: string[]
|
|
313
|
+
labelAttributes?: string[]
|
|
314
|
+
controlComponents?: string[]
|
|
315
|
+
|
|
316
|
+
assert?: ("htmlFor" | "nesting" | "both" | "either")
|
|
317
|
+
|
|
318
|
+
depth?: number
|
|
319
|
+
[k: string]: unknown | undefined
|
|
320
|
+
}]
|
|
321
|
+
// ----- jsx-a11y/label-has-for -----
|
|
322
|
+
type JsxA11YLabelHasFor = []|[{
|
|
323
|
+
components?: string[]
|
|
324
|
+
required?: (("nesting" | "id") | {
|
|
325
|
+
|
|
326
|
+
some: ("nesting" | "id")[]
|
|
327
|
+
[k: string]: unknown | undefined
|
|
328
|
+
} | {
|
|
329
|
+
|
|
330
|
+
every: ("nesting" | "id")[]
|
|
331
|
+
[k: string]: unknown | undefined
|
|
332
|
+
})
|
|
333
|
+
allowChildren?: boolean
|
|
334
|
+
[k: string]: unknown | undefined
|
|
335
|
+
}]
|
|
336
|
+
// ----- jsx-a11y/lang -----
|
|
337
|
+
type JsxA11YLang = []|[{
|
|
338
|
+
[k: string]: unknown | undefined
|
|
339
|
+
}]
|
|
340
|
+
// ----- jsx-a11y/media-has-caption -----
|
|
341
|
+
type JsxA11YMediaHasCaption = []|[{
|
|
342
|
+
audio?: string[]
|
|
343
|
+
video?: string[]
|
|
344
|
+
track?: string[]
|
|
345
|
+
[k: string]: unknown | undefined
|
|
346
|
+
}]
|
|
347
|
+
// ----- jsx-a11y/mouse-events-have-key-events -----
|
|
348
|
+
type JsxA11YMouseEventsHaveKeyEvents = []|[{
|
|
349
|
+
|
|
350
|
+
hoverInHandlers?: string[]
|
|
351
|
+
|
|
352
|
+
hoverOutHandlers?: string[]
|
|
353
|
+
[k: string]: unknown | undefined
|
|
354
|
+
}]
|
|
355
|
+
// ----- jsx-a11y/no-access-key -----
|
|
356
|
+
type JsxA11YNoAccessKey = []|[{
|
|
357
|
+
[k: string]: unknown | undefined
|
|
358
|
+
}]
|
|
359
|
+
// ----- jsx-a11y/no-aria-hidden-on-focusable -----
|
|
360
|
+
type JsxA11YNoAriaHiddenOnFocusable = []|[{
|
|
361
|
+
[k: string]: unknown | undefined
|
|
362
|
+
}]
|
|
363
|
+
// ----- jsx-a11y/no-autofocus -----
|
|
364
|
+
type JsxA11YNoAutofocus = []|[{
|
|
365
|
+
ignoreNonDOM?: boolean
|
|
366
|
+
[k: string]: unknown | undefined
|
|
367
|
+
}]
|
|
368
|
+
// ----- jsx-a11y/no-distracting-elements -----
|
|
369
|
+
type JsxA11YNoDistractingElements = []|[{
|
|
370
|
+
|
|
371
|
+
elements?: ("marquee" | "blink")[]
|
|
372
|
+
[k: string]: unknown | undefined
|
|
373
|
+
}]
|
|
374
|
+
// ----- jsx-a11y/no-interactive-element-to-noninteractive-role -----
|
|
375
|
+
type JsxA11YNoInteractiveElementToNoninteractiveRole = []|[{
|
|
376
|
+
[k: string]: string[] | undefined
|
|
377
|
+
}]
|
|
378
|
+
// ----- jsx-a11y/no-noninteractive-element-interactions -----
|
|
379
|
+
type JsxA11YNoNoninteractiveElementInteractions = []|[{
|
|
380
|
+
handlers?: string[]
|
|
381
|
+
[k: string]: unknown | undefined
|
|
382
|
+
}]
|
|
383
|
+
// ----- jsx-a11y/no-noninteractive-element-to-interactive-role -----
|
|
384
|
+
type JsxA11YNoNoninteractiveElementToInteractiveRole = []|[{
|
|
385
|
+
[k: string]: string[] | undefined
|
|
386
|
+
}]
|
|
387
|
+
// ----- jsx-a11y/no-noninteractive-tabindex -----
|
|
388
|
+
type JsxA11YNoNoninteractiveTabindex = []|[{
|
|
389
|
+
|
|
390
|
+
roles?: string[]
|
|
391
|
+
|
|
392
|
+
tags?: string[]
|
|
393
|
+
[k: string]: unknown | undefined
|
|
394
|
+
}]
|
|
395
|
+
// ----- jsx-a11y/no-onchange -----
|
|
396
|
+
type JsxA11YNoOnchange = []|[{
|
|
397
|
+
[k: string]: unknown | undefined
|
|
398
|
+
}]
|
|
399
|
+
// ----- jsx-a11y/no-redundant-roles -----
|
|
400
|
+
type JsxA11YNoRedundantRoles = []|[{
|
|
401
|
+
[k: string]: string[] | undefined
|
|
402
|
+
}]
|
|
403
|
+
// ----- jsx-a11y/no-static-element-interactions -----
|
|
404
|
+
type JsxA11YNoStaticElementInteractions = []|[{
|
|
405
|
+
handlers?: string[]
|
|
406
|
+
[k: string]: unknown | undefined
|
|
407
|
+
}]
|
|
408
|
+
// ----- jsx-a11y/prefer-tag-over-role -----
|
|
409
|
+
type JsxA11YPreferTagOverRole = []|[{
|
|
410
|
+
[k: string]: unknown | undefined
|
|
411
|
+
}]
|
|
412
|
+
// ----- jsx-a11y/role-has-required-aria-props -----
|
|
413
|
+
type JsxA11YRoleHasRequiredAriaProps = []|[{
|
|
414
|
+
[k: string]: unknown | undefined
|
|
415
|
+
}]
|
|
416
|
+
// ----- jsx-a11y/role-supports-aria-props -----
|
|
417
|
+
type JsxA11YRoleSupportsAriaProps = []|[{
|
|
418
|
+
[k: string]: unknown | undefined
|
|
419
|
+
}]
|
|
420
|
+
// ----- jsx-a11y/scope -----
|
|
421
|
+
type JsxA11YScope = []|[{
|
|
422
|
+
[k: string]: unknown | undefined
|
|
423
|
+
}]
|
|
424
|
+
// ----- jsx-a11y/tabindex-no-positive -----
|
|
425
|
+
type JsxA11YTabindexNoPositive = []|[{
|
|
426
|
+
[k: string]: unknown | undefined
|
|
427
|
+
}]
|
|
@@ -306,7 +306,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
306
306
|
partitionByNewLine?: boolean
|
|
307
307
|
}[]
|
|
308
308
|
// ----- perfectionist/sort-arrays -----
|
|
309
|
-
type PerfectionistSortArrays = {
|
|
309
|
+
type PerfectionistSortArrays = [{
|
|
310
310
|
|
|
311
311
|
fallbackSort?: {
|
|
312
312
|
|
|
@@ -482,7 +482,183 @@ type PerfectionistSortArrays = {
|
|
|
482
482
|
})
|
|
483
483
|
|
|
484
484
|
partitionByNewLine?: boolean
|
|
485
|
-
}
|
|
485
|
+
}, ...({
|
|
486
|
+
|
|
487
|
+
fallbackSort?: {
|
|
488
|
+
|
|
489
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
490
|
+
|
|
491
|
+
order?: ("asc" | "desc")
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
495
|
+
|
|
496
|
+
specialCharacters?: ("remove" | "trim" | "keep")
|
|
497
|
+
|
|
498
|
+
ignoreCase?: boolean
|
|
499
|
+
|
|
500
|
+
alphabet?: string
|
|
501
|
+
|
|
502
|
+
locales?: (string | string[])
|
|
503
|
+
|
|
504
|
+
order?: ("asc" | "desc")
|
|
505
|
+
|
|
506
|
+
customGroups?: ({
|
|
507
|
+
|
|
508
|
+
fallbackSort?: {
|
|
509
|
+
|
|
510
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
511
|
+
|
|
512
|
+
order?: ("asc" | "desc")
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
516
|
+
|
|
517
|
+
groupName: string
|
|
518
|
+
newlinesInside?: ("ignore" | number)
|
|
519
|
+
|
|
520
|
+
order?: ("asc" | "desc")
|
|
521
|
+
|
|
522
|
+
anyOf: [{
|
|
523
|
+
|
|
524
|
+
elementNamePattern?: (({
|
|
525
|
+
|
|
526
|
+
pattern: string
|
|
527
|
+
|
|
528
|
+
flags?: string
|
|
529
|
+
} | string)[] | ({
|
|
530
|
+
|
|
531
|
+
pattern: string
|
|
532
|
+
|
|
533
|
+
flags?: string
|
|
534
|
+
} | string))
|
|
535
|
+
|
|
536
|
+
selector?: "literal"
|
|
537
|
+
}, ...({
|
|
538
|
+
|
|
539
|
+
elementNamePattern?: (({
|
|
540
|
+
|
|
541
|
+
pattern: string
|
|
542
|
+
|
|
543
|
+
flags?: string
|
|
544
|
+
} | string)[] | ({
|
|
545
|
+
|
|
546
|
+
pattern: string
|
|
547
|
+
|
|
548
|
+
flags?: string
|
|
549
|
+
} | string))
|
|
550
|
+
|
|
551
|
+
selector?: "literal"
|
|
552
|
+
})[]]
|
|
553
|
+
} | {
|
|
554
|
+
|
|
555
|
+
fallbackSort?: {
|
|
556
|
+
|
|
557
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
558
|
+
|
|
559
|
+
order?: ("asc" | "desc")
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
563
|
+
|
|
564
|
+
groupName: string
|
|
565
|
+
newlinesInside?: ("ignore" | number)
|
|
566
|
+
|
|
567
|
+
order?: ("asc" | "desc")
|
|
568
|
+
|
|
569
|
+
elementNamePattern?: (({
|
|
570
|
+
|
|
571
|
+
pattern: string
|
|
572
|
+
|
|
573
|
+
flags?: string
|
|
574
|
+
} | string)[] | ({
|
|
575
|
+
|
|
576
|
+
pattern: string
|
|
577
|
+
|
|
578
|
+
flags?: string
|
|
579
|
+
} | string))
|
|
580
|
+
|
|
581
|
+
selector?: "literal"
|
|
582
|
+
})[]
|
|
583
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween")
|
|
584
|
+
|
|
585
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
586
|
+
newlinesBetween: ("ignore" | number)
|
|
587
|
+
} | {
|
|
588
|
+
group: (string | [string, ...(string)[]])
|
|
589
|
+
|
|
590
|
+
fallbackSort?: {
|
|
591
|
+
|
|
592
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
593
|
+
|
|
594
|
+
order?: ("asc" | "desc")
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
commentAbove?: string
|
|
598
|
+
|
|
599
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order")
|
|
600
|
+
newlinesInside?: ("ignore" | number)
|
|
601
|
+
|
|
602
|
+
order?: ("asc" | "desc")
|
|
603
|
+
})[]
|
|
604
|
+
newlinesBetween?: ("ignore" | number)
|
|
605
|
+
|
|
606
|
+
useConfigurationIf: {
|
|
607
|
+
|
|
608
|
+
allNamesMatchPattern?: (({
|
|
609
|
+
|
|
610
|
+
pattern: string
|
|
611
|
+
|
|
612
|
+
flags?: string
|
|
613
|
+
} | string)[] | ({
|
|
614
|
+
|
|
615
|
+
pattern: string
|
|
616
|
+
|
|
617
|
+
flags?: string
|
|
618
|
+
} | string))
|
|
619
|
+
|
|
620
|
+
matchesAstSelector?: string
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
partitionByComment?: (boolean | (({
|
|
624
|
+
|
|
625
|
+
pattern: string
|
|
626
|
+
|
|
627
|
+
flags?: string
|
|
628
|
+
} | string)[] | ({
|
|
629
|
+
|
|
630
|
+
pattern: string
|
|
631
|
+
|
|
632
|
+
flags?: string
|
|
633
|
+
} | string)) | {
|
|
634
|
+
|
|
635
|
+
block?: (boolean | (({
|
|
636
|
+
|
|
637
|
+
pattern: string
|
|
638
|
+
|
|
639
|
+
flags?: string
|
|
640
|
+
} | string)[] | ({
|
|
641
|
+
|
|
642
|
+
pattern: string
|
|
643
|
+
|
|
644
|
+
flags?: string
|
|
645
|
+
} | string)))
|
|
646
|
+
|
|
647
|
+
line?: (boolean | (({
|
|
648
|
+
|
|
649
|
+
pattern: string
|
|
650
|
+
|
|
651
|
+
flags?: string
|
|
652
|
+
} | string)[] | ({
|
|
653
|
+
|
|
654
|
+
pattern: string
|
|
655
|
+
|
|
656
|
+
flags?: string
|
|
657
|
+
} | string)))
|
|
658
|
+
})
|
|
659
|
+
|
|
660
|
+
partitionByNewLine?: boolean
|
|
661
|
+
})[]]
|
|
486
662
|
// ----- perfectionist/sort-classes -----
|
|
487
663
|
type PerfectionistSortClasses = {
|
|
488
664
|
|
|
@@ -1071,6 +1247,8 @@ type PerfectionistSortEnums = {
|
|
|
1071
1247
|
})[]
|
|
1072
1248
|
newlinesBetween?: ("ignore" | number)
|
|
1073
1249
|
|
|
1250
|
+
sortByValue?: ("always" | "ifNumericEnum" | "never")
|
|
1251
|
+
|
|
1074
1252
|
useConfigurationIf?: {
|
|
1075
1253
|
|
|
1076
1254
|
allNamesMatchPattern?: (({
|
|
@@ -1088,8 +1266,6 @@ type PerfectionistSortEnums = {
|
|
|
1088
1266
|
matchesAstSelector?: string
|
|
1089
1267
|
}
|
|
1090
1268
|
|
|
1091
|
-
sortByValue?: ("always" | "ifNumericEnum" | "never")
|
|
1092
|
-
|
|
1093
1269
|
useExperimentalDependencyDetection?: boolean
|
|
1094
1270
|
|
|
1095
1271
|
partitionByComment?: (boolean | (({
|
|
@@ -2450,6 +2626,7 @@ type PerfectionistSortIntersectionTypes = {
|
|
|
2450
2626
|
})
|
|
2451
2627
|
|
|
2452
2628
|
partitionByNewLine?: boolean
|
|
2629
|
+
ignoreCallableTypes?: boolean
|
|
2453
2630
|
}[]
|
|
2454
2631
|
// ----- perfectionist/sort-jsx-props -----
|
|
2455
2632
|
type PerfectionistSortJsxProps = {
|
package/src/typegen/react.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ export interface RuleOptions {
|
|
|
105
105
|
*/
|
|
106
106
|
'react/globals'?: Linter.RuleEntry<[]>
|
|
107
107
|
/**
|
|
108
|
-
* Validates against
|
|
108
|
+
* Validates against passing functions that mutate captured local variables into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
109
109
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
110
110
|
*/
|
|
111
111
|
'react/immutability'?: Linter.RuleEntry<[]>
|
|
@@ -460,7 +460,7 @@ export interface RuleOptions {
|
|
|
460
460
|
*/
|
|
461
461
|
'react/x-globals'?: Linter.RuleEntry<[]>
|
|
462
462
|
/**
|
|
463
|
-
* Validates against
|
|
463
|
+
* Validates against passing functions that mutate captured local variables into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
464
464
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
465
465
|
*/
|
|
466
466
|
'react/x-immutability'?: Linter.RuleEntry<[]>
|
package/src/typegen/test.d.ts
CHANGED
|
@@ -483,7 +483,7 @@ type TestNoFocusedTests = []|[{
|
|
|
483
483
|
// ----- test/no-hooks -----
|
|
484
484
|
type TestNoHooks = []|[{
|
|
485
485
|
|
|
486
|
-
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[]
|
|
486
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach" | "aroundAll" | "aroundEach")[]
|
|
487
487
|
}]
|
|
488
488
|
// ----- test/no-large-snapshots -----
|
|
489
489
|
type TestNoLargeSnapshots = []|[{
|
|
@@ -517,6 +517,8 @@ type TestPreferExpectAssertions = []|[{
|
|
|
517
517
|
onlyFunctionsWithExpectInLoop?: boolean
|
|
518
518
|
|
|
519
519
|
onlyFunctionsWithExpectInCallback?: boolean
|
|
520
|
+
|
|
521
|
+
disallowHasAssertions?: boolean
|
|
520
522
|
}]
|
|
521
523
|
// ----- test/prefer-import-in-mock -----
|
|
522
524
|
type TestPreferImportInMock = []|[{
|
package/src/typegen/ts.d.ts
CHANGED
|
@@ -248,6 +248,7 @@ export interface RuleOptions {
|
|
|
248
248
|
/**
|
|
249
249
|
* Disallow function declarations that contain unsafe references inside loop statements
|
|
250
250
|
* @see https://typescript-eslint.io/rules/no-loop-func
|
|
251
|
+
* @deprecated
|
|
251
252
|
*/
|
|
252
253
|
'ts/no-loop-func'?: Linter.RuleEntry<[]>
|
|
253
254
|
/**
|