@homer0/oxlint-config 0.2.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.
@@ -0,0 +1 @@
1
+ export const browser = {} as const;
@@ -0,0 +1,10 @@
1
+ export { base } from './base.js';
2
+ export { browser } from './browser.js';
3
+ export { jsdoc } from './jsdoc.js';
4
+ export { nextjs } from './nextjs.js';
5
+ export { node } from './node.js';
6
+ export { react } from './react.js';
7
+ export { tests } from './tests.js';
8
+ export { typeAware } from './typeAware.js';
9
+ export { typescript } from './typescript.js';
10
+ export { vitest } from './vitest.js';
@@ -0,0 +1,86 @@
1
+ export const jsdoc = {
2
+ /**
3
+ * Require valid values for JSDoc access tags.
4
+ *
5
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md
6
+ */
7
+ 'jsdoc/check-access': 'error',
8
+ /**
9
+ * Require JSDoc property names to be unique and complete.
10
+ *
11
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-property-names.md
12
+ */
13
+ 'jsdoc/check-property-names': 'error',
14
+ /**
15
+ * Require JSDoc tags to have valid names.
16
+ *
17
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md
18
+ */
19
+ 'jsdoc/check-tag-names': 'error',
20
+ /**
21
+ * Restrict `@implements` tags to classes.
22
+ *
23
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md
24
+ */
25
+ 'jsdoc/implements-on-classes': 'error',
26
+ /**
27
+ * Require every function parameter to be documented.
28
+ *
29
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md
30
+ */
31
+ 'jsdoc/require-param': 'error',
32
+ /**
33
+ * Require documented parameters to have descriptions.
34
+ *
35
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md
36
+ */
37
+ 'jsdoc/require-param-description': 'error',
38
+ /**
39
+ * Require documented parameters to have names.
40
+ *
41
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md
42
+ */
43
+ 'jsdoc/require-param-name': 'error',
44
+ /**
45
+ * Require documented parameters to have types.
46
+ *
47
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md
48
+ */
49
+ 'jsdoc/require-param-type': 'error',
50
+ /**
51
+ * Require properties to be documented when their type requires it.
52
+ *
53
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md
54
+ */
55
+ 'jsdoc/require-property': 'error',
56
+ /**
57
+ * Require documented properties to have descriptions.
58
+ *
59
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md
60
+ */
61
+ 'jsdoc/require-property-description': 'error',
62
+ /**
63
+ * Require documented properties to have names.
64
+ *
65
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md
66
+ */
67
+ 'jsdoc/require-property-name': 'error',
68
+ /**
69
+ * Require documented properties to have types.
70
+ *
71
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md
72
+ */
73
+ 'jsdoc/require-property-type': 'error',
74
+ /**
75
+ * Require return values to be documented.
76
+ *
77
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md
78
+ */
79
+ 'jsdoc/require-returns': 'error',
80
+ /**
81
+ * Require documented return values to have types.
82
+ *
83
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md
84
+ */
85
+ 'jsdoc/require-returns-type': 'error',
86
+ } as const;
@@ -0,0 +1,128 @@
1
+ export const nextjs = {
2
+ /**
3
+ * Require Google Fonts to use an allowed display strategy.
4
+ *
5
+ * @see https://nextjs.org/docs/messages/google-font-display
6
+ */
7
+ 'nextjs/google-font-display': 'warn',
8
+ /**
9
+ * Require preconnect for Google Fonts.
10
+ *
11
+ * @see https://nextjs.org/docs/messages/google-font-preconnect
12
+ */
13
+ 'nextjs/google-font-preconnect': 'warn',
14
+ /**
15
+ * Require an ID for inline Next.js scripts.
16
+ *
17
+ * @see https://nextjs.org/docs/messages/inline-script-id
18
+ */
19
+ 'nextjs/inline-script-id': 'error',
20
+ /**
21
+ * Prefer `next/script` for Google Analytics.
22
+ *
23
+ * @see https://nextjs.org/docs/messages/next-script-for-ga
24
+ */
25
+ 'nextjs/next-script-for-ga': 'warn',
26
+ /**
27
+ * Disallow assigning to the `module` variable.
28
+ *
29
+ * @see https://nextjs.org/docs/messages/no-assign-module-variable
30
+ */
31
+ 'nextjs/no-assign-module-variable': 'error',
32
+ /**
33
+ * Disallow async client components.
34
+ *
35
+ * @see https://nextjs.org/docs/messages/no-async-client-component
36
+ */
37
+ 'nextjs/no-async-client-component': 'warn',
38
+ /**
39
+ * Restrict beforeInteractive scripts to the document.
40
+ *
41
+ * @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
42
+ */
43
+ 'nextjs/no-before-interactive-script-outside-document': 'warn',
44
+ /**
45
+ * Disallow manually added stylesheet tags.
46
+ *
47
+ * @see https://nextjs.org/docs/messages/no-css-tags
48
+ */
49
+ 'nextjs/no-css-tags': 'warn',
50
+ /**
51
+ * Restrict document imports to the custom document file.
52
+ *
53
+ * @see https://nextjs.org/docs/messages/no-document-import-in-page
54
+ */
55
+ 'nextjs/no-document-import-in-page': 'error',
56
+ /**
57
+ * Disallow duplicate Head components.
58
+ *
59
+ * @see https://nextjs.org/docs/messages/no-duplicate-head
60
+ */
61
+ 'nextjs/no-duplicate-head': 'error',
62
+ /**
63
+ * Disallow the HTML head element in Next.js pages.
64
+ *
65
+ * @see https://nextjs.org/docs/messages/no-head-element
66
+ */
67
+ 'nextjs/no-head-element': 'warn',
68
+ /**
69
+ * Restrict document head imports to the custom document file.
70
+ *
71
+ * @see https://nextjs.org/docs/messages/no-head-import-in-document
72
+ */
73
+ 'nextjs/no-head-import-in-document': 'error',
74
+ /**
75
+ * Require Next.js routing instead of HTML links between pages.
76
+ *
77
+ * @see https://nextjs.org/docs/messages/no-html-link-for-pages
78
+ */
79
+ 'nextjs/no-html-link-for-pages': 'error',
80
+ /**
81
+ * Prefer `next/image` over HTML image elements.
82
+ *
83
+ * @see https://nextjs.org/docs/messages/no-img-element
84
+ */
85
+ 'nextjs/no-img-element': 'warn',
86
+ /**
87
+ * Restrict custom fonts to the custom document file.
88
+ *
89
+ * @see https://nextjs.org/docs/messages/no-page-custom-font
90
+ */
91
+ 'nextjs/no-page-custom-font': 'warn',
92
+ /**
93
+ * Disallow Script components in Head.
94
+ *
95
+ * @see https://nextjs.org/docs/messages/no-script-component-in-head
96
+ */
97
+ 'nextjs/no-script-component-in-head': 'error',
98
+ /**
99
+ * Restrict styled-jsx to supported files.
100
+ *
101
+ * @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
102
+ */
103
+ 'nextjs/no-styled-jsx-in-document': 'warn',
104
+ /**
105
+ * Disallow synchronous script tags.
106
+ *
107
+ * @see https://nextjs.org/docs/messages/no-sync-scripts
108
+ */
109
+ 'nextjs/no-sync-scripts': 'error',
110
+ /**
111
+ * Restrict title tags in the custom document head.
112
+ *
113
+ * @see https://nextjs.org/docs/messages/no-title-in-document-head
114
+ */
115
+ 'nextjs/no-title-in-document-head': 'warn',
116
+ /**
117
+ * Catch misspelled Next.js data-fetching methods.
118
+ *
119
+ * @see https://nextjs.org/docs/messages/no-typos
120
+ */
121
+ 'nextjs/no-typos': 'warn',
122
+ /**
123
+ * Disallow deprecated Polyfill.io URLs.
124
+ *
125
+ * @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
126
+ */
127
+ 'nextjs/no-unwanted-polyfillio': 'warn',
128
+ } as const;
@@ -0,0 +1,44 @@
1
+ export const node = {
2
+ /**
3
+ * disallow the assignment to `exports`
4
+ *
5
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-exports-assign.md
6
+ */
7
+ 'node/no-exports-assign': 'error',
8
+ /**
9
+ * Require `require()` calls to be placed at top-level module scope.
10
+ *
11
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/global-require.md
12
+ */
13
+ 'node/global-require': 'error',
14
+ /**
15
+ * Require error handling in callbacks.
16
+ *
17
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/handle-callback-err.md
18
+ */
19
+ 'node/handle-callback-err': ['error', '^(err|error|\\w+Error)$'],
20
+ /**
21
+ * Disallow `require` calls to be mixed with regular variable declarations.
22
+ *
23
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-mixed-requires.md
24
+ */
25
+ 'node/no-mixed-requires': 'error',
26
+ /**
27
+ * disallow `new` operators with calls to `require`
28
+ *
29
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-new-require.md
30
+ */
31
+ 'node/no-new-require': 'error',
32
+ /**
33
+ * disallow string concatenation with `__dirname` and `__filename`
34
+ *
35
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
36
+ */
37
+ 'node/no-path-concat': 'error',
38
+ /**
39
+ * disallow the use of `process.env`
40
+ *
41
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-env.md
42
+ */
43
+ 'node/no-process-env': 'error',
44
+ } as const;
@@ -0,0 +1,410 @@
1
+ export const react = {
2
+ /**
3
+ * Enforce all elements that require alternative text have meaningful information to
4
+ * relay back to end user.
5
+ *
6
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md
7
+ */
8
+ 'jsx-a11y/alt-text': 'error',
9
+ /**
10
+ * Enforce all anchors to contain accessible content.
11
+ *
12
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md
13
+ */
14
+ 'jsx-a11y/anchor-has-content': 'error',
15
+ /**
16
+ * Enforce all anchors are valid, navigable elements.
17
+ *
18
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md
19
+ */
20
+ 'jsx-a11y/anchor-is-valid': 'error',
21
+ /**
22
+ * Enforce elements with aria-activedescendant are tabbable.
23
+ *
24
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md
25
+ */
26
+ 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
27
+ /**
28
+ * Enforce all `aria-*` props are valid.
29
+ *
30
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md
31
+ */
32
+ 'jsx-a11y/aria-props': 'error',
33
+ /**
34
+ * Enforce ARIA state and property values are valid.
35
+ *
36
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md
37
+ */
38
+ 'jsx-a11y/aria-proptypes': 'error',
39
+ /**
40
+ * Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
41
+ *
42
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md
43
+ */
44
+ 'jsx-a11y/aria-role': 'error',
45
+ /**
46
+ * Enforce that elements that do not support ARIA roles, states, and properties do not
47
+ * have those attributes.
48
+ *
49
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md
50
+ */
51
+ 'jsx-a11y/aria-unsupported-elements': 'error',
52
+ /**
53
+ * Enforce that autocomplete attributes are used correctly.
54
+ *
55
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md
56
+ */
57
+ 'jsx-a11y/autocomplete-valid': 'error',
58
+ /**
59
+ * Enforce a clickable non-interactive element has at least one keyboard event listener.
60
+ *
61
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md
62
+ */
63
+ 'jsx-a11y/click-events-have-key-events': 'error',
64
+ /**
65
+ * Enforce interactive controls have an associated text label.
66
+ *
67
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/control-has-associated-label.md
68
+ */
69
+ 'jsx-a11y/control-has-associated-label': 'error',
70
+ /**
71
+ * Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
72
+ *
73
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md
74
+ */
75
+ 'jsx-a11y/heading-has-content': 'error',
76
+ /**
77
+ * Enforce `<html>` element has `lang` prop.
78
+ *
79
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md
80
+ */
81
+ 'jsx-a11y/html-has-lang': 'error',
82
+ /**
83
+ * Enforce iframe elements have a title attribute.
84
+ *
85
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md
86
+ */
87
+ 'jsx-a11y/iframe-has-title': 'error',
88
+ /**
89
+ * Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
90
+ *
91
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md
92
+ */
93
+ 'jsx-a11y/img-redundant-alt': 'error',
94
+ /**
95
+ * Enforce that elements with interactive handlers like `onClick` must be focusable.
96
+ *
97
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md
98
+ */
99
+ 'jsx-a11y/interactive-supports-focus': [
100
+ 'error',
101
+ {
102
+ tabbable: [
103
+ 'button',
104
+ 'checkbox',
105
+ 'link',
106
+ 'searchbox',
107
+ 'spinbutton',
108
+ 'switch',
109
+ 'textbox',
110
+ ],
111
+ },
112
+ ],
113
+ /**
114
+ * Enforce that a `label` tag has a text label and an associated control.
115
+ *
116
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md
117
+ */
118
+ 'jsx-a11y/label-has-associated-control': 'error',
119
+ /**
120
+ * Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
121
+ *
122
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md
123
+ */
124
+ 'jsx-a11y/media-has-caption': 'error',
125
+ /**
126
+ * Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for
127
+ * keyboard-only users.
128
+ *
129
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md
130
+ */
131
+ 'jsx-a11y/mouse-events-have-key-events': 'error',
132
+ /**
133
+ * Enforce that the `accessKey` prop is not used on any element to avoid complications
134
+ * with keyboard commands used by a screen reader.
135
+ *
136
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md
137
+ */
138
+ 'jsx-a11y/no-access-key': 'error',
139
+ /**
140
+ * Enforce autoFocus prop is not used.
141
+ *
142
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md
143
+ */
144
+ 'jsx-a11y/no-autofocus': 'error',
145
+ /**
146
+ * Enforce distracting elements are not used.
147
+ *
148
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md
149
+ */
150
+ 'jsx-a11y/no-distracting-elements': 'error',
151
+ /**
152
+ * Interactive elements should not be assigned non-interactive roles.
153
+ *
154
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md
155
+ */
156
+ 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
157
+ 'error',
158
+ {
159
+ tr: ['none', 'presentation'],
160
+ canvas: ['img'],
161
+ },
162
+ ],
163
+ /**
164
+ * Non-interactive elements should not be assigned mouse or keyboard event listeners.
165
+ *
166
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md
167
+ */
168
+ 'jsx-a11y/no-noninteractive-element-interactions': [
169
+ 'error',
170
+ {
171
+ handlers: [
172
+ 'onClick',
173
+ 'onError',
174
+ 'onLoad',
175
+ 'onMouseDown',
176
+ 'onMouseUp',
177
+ 'onKeyPress',
178
+ 'onKeyDown',
179
+ 'onKeyUp',
180
+ ],
181
+ alert: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
182
+ body: ['onError', 'onLoad'],
183
+ dialog: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
184
+ iframe: ['onError', 'onLoad'],
185
+ img: ['onError', 'onLoad'],
186
+ },
187
+ ],
188
+ /**
189
+ * Non-interactive elements should not be assigned interactive roles.
190
+ *
191
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md
192
+ */
193
+ 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
194
+ 'error',
195
+ {
196
+ ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
197
+ ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
198
+ li: [
199
+ 'menuitem',
200
+ 'menuitemradio',
201
+ 'menuitemcheckbox',
202
+ 'option',
203
+ 'row',
204
+ 'tab',
205
+ 'treeitem',
206
+ ],
207
+ table: ['grid'],
208
+ td: ['gridcell'],
209
+ fieldset: ['radiogroup', 'presentation'],
210
+ },
211
+ ],
212
+ /**
213
+ * `tabIndex` should only be declared on interactive elements.
214
+ *
215
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md
216
+ */
217
+ 'jsx-a11y/no-noninteractive-tabindex': [
218
+ 'error',
219
+ {
220
+ tags: [],
221
+ roles: ['tabpanel'],
222
+ allowExpressionValues: true,
223
+ },
224
+ ],
225
+ /**
226
+ * Enforce explicit role property is not the same as implicit/default role property on
227
+ * element.
228
+ *
229
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md
230
+ */
231
+ 'jsx-a11y/no-redundant-roles': 'error',
232
+ /**
233
+ * Enforce that non-interactive, visible elements (such as `<div>`) that have click
234
+ * handlers use the role attribute.
235
+ *
236
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md
237
+ */
238
+ 'jsx-a11y/no-static-element-interactions': [
239
+ 'error',
240
+ {
241
+ allowExpressionValues: true,
242
+ handlers: [
243
+ 'onClick',
244
+ 'onMouseDown',
245
+ 'onMouseUp',
246
+ 'onKeyPress',
247
+ 'onKeyDown',
248
+ 'onKeyUp',
249
+ ],
250
+ },
251
+ ],
252
+ /**
253
+ * Enforce that elements with ARIA roles must have all required attributes for that
254
+ * role.
255
+ *
256
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md
257
+ */
258
+ 'jsx-a11y/role-has-required-aria-props': 'error',
259
+ /**
260
+ * Enforce that elements with explicit or implicit roles defined contain only `aria-*`
261
+ * properties supported by that `role`.
262
+ *
263
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md
264
+ */
265
+ 'jsx-a11y/role-supports-aria-props': 'error',
266
+ /**
267
+ * Enforce `scope` prop is only used on `<th>` elements.
268
+ *
269
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md
270
+ */
271
+ 'jsx-a11y/scope': 'error',
272
+ /**
273
+ * Enforce `tabIndex` value is not greater than zero.
274
+ *
275
+ * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md
276
+ */
277
+ 'jsx-a11y/tabindex-no-positive': 'error',
278
+ /**
279
+ * Disallow missing displayName in a React component definition.
280
+ *
281
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md
282
+ */
283
+ 'react/display-name': 2,
284
+ /**
285
+ * Disallow missing `key` props in iterators/collection literals.
286
+ *
287
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md
288
+ */
289
+ 'react/jsx-key': 2,
290
+ /**
291
+ * Disallow comments from being inserted as text nodes.
292
+ *
293
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md
294
+ */
295
+ 'react/jsx-no-comment-textnodes': 2,
296
+ /**
297
+ * Disallow duplicate properties in JSX.
298
+ *
299
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md
300
+ */
301
+ 'react/jsx-no-duplicate-props': 2,
302
+ /**
303
+ * Disallow `target="_blank"` attribute without `rel="noreferrer"`
304
+ *
305
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md
306
+ */
307
+ 'react/jsx-no-target-blank': 2,
308
+ /**
309
+ * Disallow undeclared variables in JSX.
310
+ *
311
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md
312
+ */
313
+ 'react/jsx-no-undef': 2,
314
+ /**
315
+ * Disallow passing of children as props.
316
+ *
317
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md
318
+ */
319
+ 'react/no-children-prop': 2,
320
+ /**
321
+ * Disallow when a DOM element is using both children and dangerouslySetInnerHTML.
322
+ *
323
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md
324
+ */
325
+ 'react/no-danger-with-children': 2,
326
+ /**
327
+ * Disallow direct mutation of this.state.
328
+ *
329
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md
330
+ */
331
+ 'react/no-direct-mutation-state': 2,
332
+ /**
333
+ * Disallow usage of findDOMNode.
334
+ *
335
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md
336
+ */
337
+ 'react/no-find-dom-node': 2,
338
+ /**
339
+ * Disallow usage of isMounted.
340
+ *
341
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md
342
+ */
343
+ 'react/no-is-mounted': 2,
344
+ /**
345
+ * Disallow usage of the return value of ReactDOM.render.
346
+ *
347
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md
348
+ */
349
+ 'react/no-render-return-value': 2,
350
+ /**
351
+ * Disallow using string references.
352
+ *
353
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md
354
+ */
355
+ 'react/no-string-refs': 2,
356
+ /**
357
+ * Disallow unescaped HTML entities from appearing in markup.
358
+ *
359
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md
360
+ */
361
+ 'react/no-unescaped-entities': 2,
362
+ /**
363
+ * Disallow usage of unknown DOM property.
364
+ *
365
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md
366
+ */
367
+ 'react/no-unknown-property': 2,
368
+ /**
369
+ * Enforce ES5 or ES6 class for returning value in render function.
370
+ *
371
+ * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md
372
+ */
373
+ 'react/require-render-return': 2,
374
+ /**
375
+ * Enforces the Rules of Hooks.
376
+ *
377
+ * @see https://react.dev/reference/rules/rules-of-hooks
378
+ */
379
+ 'react/rules-of-hooks': 'error',
380
+ /**
381
+ * Verifies the list of dependencies for Hooks like useEffect and similar.
382
+ *
383
+ * @see https://github.com/facebook/react/issues/14920
384
+ */
385
+ 'react/exhaustive-deps': 'warn',
386
+ /**
387
+ * Disallow new arrays passed directly as JSX props.
388
+ *
389
+ * @see https://github.com/cvazac/eslint-plugin-react-perf/blob/master/docs/rules/jsx-no-new-array-as-prop.md
390
+ */
391
+ 'react-perf/jsx-no-new-array-as-prop': 'error',
392
+ /**
393
+ * Disallow new functions passed directly as JSX props.
394
+ *
395
+ * @see https://github.com/cvazac/eslint-plugin-react-perf/blob/master/docs/rules/jsx-no-new-function-as-prop.md
396
+ */
397
+ 'react-perf/jsx-no-new-function-as-prop': 'error',
398
+ /**
399
+ * Disallow new objects passed directly as JSX props.
400
+ *
401
+ * @see https://github.com/cvazac/eslint-plugin-react-perf/blob/master/docs/rules/jsx-no-new-object-as-prop.md
402
+ */
403
+ 'react-perf/jsx-no-new-object-as-prop': 'error',
404
+ /**
405
+ * Allow React components to reference declarations defined later in the file.
406
+ *
407
+ * @see https://eslint.org/docs/latest/rules/no-use-before-define
408
+ */
409
+ 'no-use-before-define': 'off',
410
+ } as const;