@4mbl/lint 0.0.0-alpha.f2a34bd → 0.0.0-alpha.fd9d9d6

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/react.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineConfig, type OxlintConfig } from 'oxlint';
2
2
  export type ReactOptions = {};
3
- declare function reactConfig(_options?: Partial<ReactOptions>): {
3
+ declare function reactConfig(options?: Partial<ReactOptions>): {
4
4
  extends: {
5
- plugins: ("unicorn" | "typescript")[];
5
+ plugins: ("unicorn" | "typescript" | "import")[];
6
6
  jsPlugins: never[];
7
7
  categories: {
8
8
  correctness: "error";
@@ -20,123 +20,165 @@ declare function reactConfig(_options?: Partial<ReactOptions>): {
20
20
  typeAware: true;
21
21
  };
22
22
  rules: {
23
- 'constructor-super': "error";
24
- 'for-direction': "error";
25
- 'getter-return': "error";
26
- 'no-async-promise-executor': "error";
27
- 'no-case-declarations': "error";
28
- 'no-class-assign': "error";
29
- 'no-compare-neg-zero': "error";
30
- 'no-cond-assign': "error";
31
- 'no-const-assign': "error";
32
- 'no-constant-binary-expression': "error";
33
- 'no-constant-condition': "error";
34
- 'no-control-regex': "error";
35
- 'no-debugger': "error";
36
- 'no-delete-var': "error";
37
- 'no-dupe-class-members': "error";
38
- 'no-dupe-else-if': "error";
39
- 'no-dupe-keys': "error";
40
- 'no-duplicate-case': "error";
41
- 'no-empty': "error";
42
- 'no-empty-character-class': "error";
43
- 'no-empty-pattern': "error";
44
- 'no-empty-static-block': "error";
45
- 'no-ex-assign': "error";
46
- 'no-extra-boolean-cast': "error";
47
- 'no-fallthrough': "error";
48
- 'no-func-assign': "error";
49
- 'no-global-assign': "error";
50
- 'no-import-assign': "error";
51
- 'no-invalid-regexp': "error";
52
- 'no-irregular-whitespace': "error";
53
- 'no-loss-of-precision': "error";
54
- 'no-misleading-character-class': "error";
55
- 'no-new-native-nonconstructor': "error";
56
- 'no-nonoctal-decimal-escape': "error";
57
- 'no-obj-calls': "error";
58
- 'no-prototype-builtins': "error";
59
- 'no-redeclare': "error";
60
- 'no-regex-spaces': "error";
61
- 'no-self-assign': "error";
62
- 'no-setter-return': "error";
63
- 'no-shadow-restricted-names': "error";
64
- 'no-sparse-arrays': "error";
65
- 'no-this-before-super': "error";
66
- 'no-undef': "error";
67
- 'no-unexpected-multiline': "error";
68
- 'no-unreachable': "error";
69
- 'no-unsafe-finally': "error";
70
- 'no-unsafe-negation': "error";
71
- 'no-unsafe-optional-chaining': "error";
72
- 'no-unused-labels': "error";
73
- 'no-unused-private-class-members': "error";
74
- 'no-unused-vars': "warn";
75
- 'no-useless-backreference': "error";
76
- 'no-useless-catch': "error";
77
- 'no-useless-escape': "error";
78
- 'no-with': "error";
79
- 'require-yield': "error";
80
- 'use-isnan': "error";
81
- 'valid-typeof': "error";
82
- '@typescript-eslint/ban-ts-comment': "error";
83
- 'no-array-constructor': "error";
84
- '@typescript-eslint/no-duplicate-enum-values': "error";
85
- '@typescript-eslint/no-empty-object-type': "error";
86
- '@typescript-eslint/no-explicit-any': "error";
87
- '@typescript-eslint/no-extra-non-null-assertion': "error";
88
- '@typescript-eslint/no-misused-new': "error";
89
- '@typescript-eslint/no-namespace': "error";
90
- '@typescript-eslint/no-non-null-asserted-optional-chain': "error";
91
- '@typescript-eslint/no-require-imports': "error";
92
- '@typescript-eslint/no-this-alias': "error";
93
- '@typescript-eslint/no-unnecessary-type-constraint': "error";
94
- '@typescript-eslint/no-unsafe-declaration-merging': "error";
95
- '@typescript-eslint/no-unsafe-function-type': "error";
96
- 'no-unused-expressions': "warn";
97
- '@typescript-eslint/no-wrapper-object-types': "error";
98
- '@typescript-eslint/prefer-as-const': "error";
99
- '@typescript-eslint/prefer-namespace-keyword': "error";
100
- '@typescript-eslint/triple-slash-reference': "error";
23
+ 'eslint/no-var': "warn";
24
+ 'eslint/prefer-const': "error";
25
+ 'eslint/prefer-rest-params': "error";
26
+ 'eslint/prefer-spread': "error";
27
+ 'eslint/no-async-promise-executor': "error";
28
+ 'eslint/no-case-declarations': "error";
29
+ 'eslint/no-class-assign': "error";
30
+ 'eslint/no-compare-neg-zero': "error";
31
+ 'eslint/no-cond-assign': "error";
32
+ 'eslint/no-const-assign': "error";
33
+ 'eslint/no-constant-binary-expression': "error";
34
+ 'eslint/no-constant-condition': "error";
35
+ 'eslint/no-control-regex': "error";
36
+ 'eslint/no-debugger': "error";
37
+ 'eslint/no-delete-var': "error";
38
+ 'eslint/no-dupe-else-if': "error";
39
+ 'eslint/no-duplicate-case': "error";
40
+ 'eslint/no-empty': "error";
41
+ 'eslint/no-empty-character-class': "error";
42
+ 'eslint/no-empty-pattern': "error";
43
+ 'eslint/no-empty-static-block': "error";
44
+ 'eslint/no-ex-assign': "error";
45
+ 'eslint/no-extra-boolean-cast': "error";
46
+ 'eslint/no-fallthrough': ["error", {
47
+ allowEmptyCase: boolean;
48
+ }];
49
+ 'eslint/no-func-assign': "error";
50
+ 'eslint/no-global-assign': "error";
51
+ 'eslint/no-import-assign': "error";
52
+ 'eslint/no-invalid-regexp': "error";
53
+ 'eslint/no-irregular-whitespace': "error";
54
+ 'eslint/no-loss-of-precision': "error";
55
+ 'eslint/no-misleading-character-class': "error";
56
+ 'eslint/no-nonoctal-decimal-escape': "error";
57
+ 'eslint/no-obj-calls': "error";
58
+ 'eslint/no-prototype-builtins': "error";
59
+ 'eslint/no-redeclare': "error";
60
+ 'eslint/no-regex-spaces': "error";
61
+ 'eslint/no-self-assign': "error";
62
+ 'eslint/no-shadow-restricted-names': "error";
63
+ 'eslint/no-sparse-arrays': "error";
64
+ 'eslint/no-unexpected-multiline': "error";
65
+ 'eslint/no-unsafe-finally': "error";
66
+ 'eslint/no-unsafe-negation': "error";
67
+ 'eslint/no-unsafe-optional-chaining': "error";
68
+ 'eslint/no-unused-labels': "error";
69
+ 'eslint/no-unused-private-class-members': "error";
70
+ 'eslint/no-unused-vars': "warn";
71
+ 'eslint/no-useless-backreference': "error";
72
+ 'eslint/no-useless-catch': "error";
73
+ 'eslint/no-useless-escape': "error";
74
+ 'eslint/require-yield': "error";
75
+ 'eslint/use-isnan': "error";
76
+ 'eslint/valid-typeof': "error";
77
+ 'eslint/no-unused-expressions': "warn";
78
+ 'typescript/ban-ts-comment': "error";
79
+ 'typescript/no-duplicate-enum-values': "off";
80
+ 'typescript/no-empty-object-type': "error";
81
+ 'typescript/no-explicit-any': "error";
82
+ 'typescript/no-extra-non-null-assertion': "error";
83
+ 'typescript/no-misused-new': "error";
84
+ 'typescript/no-namespace': "error";
85
+ 'typescript/no-non-null-asserted-optional-chain': "error";
86
+ 'typescript/no-require-imports': "error";
87
+ 'typescript/no-this-alias': "error";
88
+ 'typescript/no-unnecessary-type-constraint': "error";
89
+ 'typescript/no-unsafe-declaration-merging': "error";
90
+ 'typescript/no-unsafe-function-type': "error";
91
+ 'typescript/no-wrapper-object-types': "error";
92
+ 'typescript/prefer-as-const': "error";
93
+ 'typescript/triple-slash-reference': "error";
94
+ 'typescript/explicit-member-accessibility': ["warn", {
95
+ accessibility: string;
96
+ }];
97
+ 'eslint/id-length': "off";
98
+ 'eslint/sort-keys': "off";
99
+ 'eslint/capitalized-comments': "off";
100
+ 'eslint/func-style': "off";
101
+ 'eslint/complexity': "off";
102
+ 'eslint/max-params': "off";
103
+ 'eslint/no-ternary': "off";
104
+ 'eslint/curly': "warn";
105
+ 'typescript/consistent-type-definitions': ["warn", string];
106
+ 'eslint/max-statements': "off";
107
+ 'typescript/consistent-return': "off";
108
+ 'unicorn/switch-case-braces': "warn";
109
+ 'typescript/prefer-regexp-exec': "warn";
110
+ 'eslint/init-declarations': "off";
111
+ 'unicorn/no-null': "off";
112
+ 'eslint/no-undefined': "off";
113
+ 'eslint/no-console': "off";
114
+ 'eslint/no-continue': "off";
115
+ 'eslint/no-implicit-coercion': ["warn", {
116
+ allow: string[];
117
+ }];
118
+ 'eslint/no-plusplus': "off";
119
+ 'eslint/no-void': "off";
120
+ 'eslint/no-nested-ternary': "off";
121
+ 'eslint/no-empty-function': ["warn", {
122
+ allow: string[];
123
+ }];
124
+ 'unicorn/no-instanceof-builtins': "off";
125
+ 'unicorn/prefer-spread': "off";
126
+ 'eslint/new-cap': "off";
127
+ 'unicorn/no-await-expression-member': "off";
128
+ 'eslint/no-duplicate-imports': ["warn", {
129
+ allowSeparateTypeImports: boolean;
130
+ }];
131
+ 'import/no-named-export': "off";
132
+ 'import/no-default-export': "off";
133
+ 'import/prefer-default-export': "off";
134
+ 'import/no-namespace': "off";
135
+ 'import/exports-last': "off";
136
+ 'import/no-unassigned-import': "off";
137
+ 'import/group-exports': "off";
138
+ 'import/consistent-type-specifier-style': "off";
139
+ 'unicorn/no-new-array': "off";
140
+ 'eslint/no-array-constructor': "warn";
141
+ 'typescript/explicit-function-return-type': "off";
142
+ 'typescript/explicit-module-boundary-types': "off";
143
+ 'unicorn/no-anonymous-default-export': "off";
144
+ 'eslint/sort-imports': "off";
145
+ 'import/no-relative-parent-imports': "off";
146
+ 'eslint/no-magic-numbers': "off";
147
+ 'unicorn/prefer-modern-math-apis': "off";
148
+ 'eslint/no-use-before-define': "off";
149
+ 'eslint/constructor-super': "off";
150
+ 'eslint/getter-return': "off";
151
+ 'eslint/no-dupe-class-members': "off";
152
+ 'eslint/no-dupe-keys': "off";
153
+ 'eslint/no-new-native-nonconstructor': "off";
154
+ 'eslint/no-setter-return': "off";
155
+ 'eslint/no-this-before-super': "off";
156
+ 'eslint/no-undef': "off";
157
+ 'eslint/no-unreachable': "off";
158
+ 'eslint/no-with': "off";
159
+ 'unicorn/no-nested-ternary': "off";
160
+ 'oxc/no-optional-chaining': "off";
161
+ 'oxc/no-rest-spread-properties': "off";
162
+ 'oxc/no-async-await': "off";
101
163
  };
102
- overrides: {
103
- files: string[];
104
- rules: {
105
- 'constructor-super': "off";
106
- 'getter-return': "off";
107
- 'no-class-assign': "off";
108
- 'no-const-assign': "off";
109
- 'no-dupe-class-members': "off";
110
- 'no-dupe-keys': "off";
111
- 'no-func-assign': "off";
112
- 'no-import-assign': "off";
113
- 'no-new-native-nonconstructor': "off";
114
- 'no-obj-calls': "off";
115
- 'no-redeclare': "off";
116
- 'no-setter-return': "off";
117
- 'no-this-before-super': "off";
118
- 'no-undef': "off";
119
- 'no-unreachable': "off";
120
- 'no-unsafe-negation': "off";
121
- 'no-var': "error";
122
- 'no-with': "off";
123
- 'prefer-const': "error";
124
- 'prefer-rest-params': "error";
125
- 'prefer-spread': "error";
126
- };
127
- }[];
128
164
  }[];
129
- plugins: "react"[];
165
+ plugins: ("react" | "unicorn" | "typescript" | "import")[];
130
166
  jsPlugins: {
131
167
  name: string;
132
168
  specifier: string;
133
169
  }[];
134
170
  rules: {
135
- 'react-hooks-js/rules-of-hooks': "error";
136
- 'react-hooks-js/exhaustive-deps': "warn";
171
+ 'react/rules-of-hooks': "error";
172
+ 'react/exhaustive-deps': "warn";
137
173
  'react-hooks-js/set-state-in-effect': "warn";
138
- 'react-refresh-js/only-export-components': "error";
174
+ 'react/only-export-components': "error";
139
175
  'react-compiler-js/react-compiler': "error";
176
+ 'react/jsx-filename-extension': "off";
177
+ 'react/jsx-max-depth': "off";
178
+ 'react/no-multi-comp': "off";
179
+ 'react/jsx-props-no-spreading': "off";
180
+ 'react/forbid-component-props': "off";
181
+ 'react/forbid-dom-props': "off";
140
182
  };
141
183
  overrides: {
142
184
  files: string[];
@@ -189,7 +231,7 @@ declare function reactConfig(_options?: Partial<ReactOptions>): {
189
231
  export { type OxlintConfig, defineConfig, reactConfig };
190
232
  declare const _default: {
191
233
  extends: {
192
- plugins: ("unicorn" | "typescript")[];
234
+ plugins: ("unicorn" | "typescript" | "import")[];
193
235
  jsPlugins: never[];
194
236
  categories: {
195
237
  correctness: "error";
@@ -207,123 +249,165 @@ declare const _default: {
207
249
  typeAware: true;
208
250
  };
209
251
  rules: {
210
- 'constructor-super': "error";
211
- 'for-direction': "error";
212
- 'getter-return': "error";
213
- 'no-async-promise-executor': "error";
214
- 'no-case-declarations': "error";
215
- 'no-class-assign': "error";
216
- 'no-compare-neg-zero': "error";
217
- 'no-cond-assign': "error";
218
- 'no-const-assign': "error";
219
- 'no-constant-binary-expression': "error";
220
- 'no-constant-condition': "error";
221
- 'no-control-regex': "error";
222
- 'no-debugger': "error";
223
- 'no-delete-var': "error";
224
- 'no-dupe-class-members': "error";
225
- 'no-dupe-else-if': "error";
226
- 'no-dupe-keys': "error";
227
- 'no-duplicate-case': "error";
228
- 'no-empty': "error";
229
- 'no-empty-character-class': "error";
230
- 'no-empty-pattern': "error";
231
- 'no-empty-static-block': "error";
232
- 'no-ex-assign': "error";
233
- 'no-extra-boolean-cast': "error";
234
- 'no-fallthrough': "error";
235
- 'no-func-assign': "error";
236
- 'no-global-assign': "error";
237
- 'no-import-assign': "error";
238
- 'no-invalid-regexp': "error";
239
- 'no-irregular-whitespace': "error";
240
- 'no-loss-of-precision': "error";
241
- 'no-misleading-character-class': "error";
242
- 'no-new-native-nonconstructor': "error";
243
- 'no-nonoctal-decimal-escape': "error";
244
- 'no-obj-calls': "error";
245
- 'no-prototype-builtins': "error";
246
- 'no-redeclare': "error";
247
- 'no-regex-spaces': "error";
248
- 'no-self-assign': "error";
249
- 'no-setter-return': "error";
250
- 'no-shadow-restricted-names': "error";
251
- 'no-sparse-arrays': "error";
252
- 'no-this-before-super': "error";
253
- 'no-undef': "error";
254
- 'no-unexpected-multiline': "error";
255
- 'no-unreachable': "error";
256
- 'no-unsafe-finally': "error";
257
- 'no-unsafe-negation': "error";
258
- 'no-unsafe-optional-chaining': "error";
259
- 'no-unused-labels': "error";
260
- 'no-unused-private-class-members': "error";
261
- 'no-unused-vars': "warn";
262
- 'no-useless-backreference': "error";
263
- 'no-useless-catch': "error";
264
- 'no-useless-escape': "error";
265
- 'no-with': "error";
266
- 'require-yield': "error";
267
- 'use-isnan': "error";
268
- 'valid-typeof': "error";
269
- '@typescript-eslint/ban-ts-comment': "error";
270
- 'no-array-constructor': "error";
271
- '@typescript-eslint/no-duplicate-enum-values': "error";
272
- '@typescript-eslint/no-empty-object-type': "error";
273
- '@typescript-eslint/no-explicit-any': "error";
274
- '@typescript-eslint/no-extra-non-null-assertion': "error";
275
- '@typescript-eslint/no-misused-new': "error";
276
- '@typescript-eslint/no-namespace': "error";
277
- '@typescript-eslint/no-non-null-asserted-optional-chain': "error";
278
- '@typescript-eslint/no-require-imports': "error";
279
- '@typescript-eslint/no-this-alias': "error";
280
- '@typescript-eslint/no-unnecessary-type-constraint': "error";
281
- '@typescript-eslint/no-unsafe-declaration-merging': "error";
282
- '@typescript-eslint/no-unsafe-function-type': "error";
283
- 'no-unused-expressions': "warn";
284
- '@typescript-eslint/no-wrapper-object-types': "error";
285
- '@typescript-eslint/prefer-as-const': "error";
286
- '@typescript-eslint/prefer-namespace-keyword': "error";
287
- '@typescript-eslint/triple-slash-reference': "error";
252
+ 'eslint/no-var': "warn";
253
+ 'eslint/prefer-const': "error";
254
+ 'eslint/prefer-rest-params': "error";
255
+ 'eslint/prefer-spread': "error";
256
+ 'eslint/no-async-promise-executor': "error";
257
+ 'eslint/no-case-declarations': "error";
258
+ 'eslint/no-class-assign': "error";
259
+ 'eslint/no-compare-neg-zero': "error";
260
+ 'eslint/no-cond-assign': "error";
261
+ 'eslint/no-const-assign': "error";
262
+ 'eslint/no-constant-binary-expression': "error";
263
+ 'eslint/no-constant-condition': "error";
264
+ 'eslint/no-control-regex': "error";
265
+ 'eslint/no-debugger': "error";
266
+ 'eslint/no-delete-var': "error";
267
+ 'eslint/no-dupe-else-if': "error";
268
+ 'eslint/no-duplicate-case': "error";
269
+ 'eslint/no-empty': "error";
270
+ 'eslint/no-empty-character-class': "error";
271
+ 'eslint/no-empty-pattern': "error";
272
+ 'eslint/no-empty-static-block': "error";
273
+ 'eslint/no-ex-assign': "error";
274
+ 'eslint/no-extra-boolean-cast': "error";
275
+ 'eslint/no-fallthrough': ["error", {
276
+ allowEmptyCase: boolean;
277
+ }];
278
+ 'eslint/no-func-assign': "error";
279
+ 'eslint/no-global-assign': "error";
280
+ 'eslint/no-import-assign': "error";
281
+ 'eslint/no-invalid-regexp': "error";
282
+ 'eslint/no-irregular-whitespace': "error";
283
+ 'eslint/no-loss-of-precision': "error";
284
+ 'eslint/no-misleading-character-class': "error";
285
+ 'eslint/no-nonoctal-decimal-escape': "error";
286
+ 'eslint/no-obj-calls': "error";
287
+ 'eslint/no-prototype-builtins': "error";
288
+ 'eslint/no-redeclare': "error";
289
+ 'eslint/no-regex-spaces': "error";
290
+ 'eslint/no-self-assign': "error";
291
+ 'eslint/no-shadow-restricted-names': "error";
292
+ 'eslint/no-sparse-arrays': "error";
293
+ 'eslint/no-unexpected-multiline': "error";
294
+ 'eslint/no-unsafe-finally': "error";
295
+ 'eslint/no-unsafe-negation': "error";
296
+ 'eslint/no-unsafe-optional-chaining': "error";
297
+ 'eslint/no-unused-labels': "error";
298
+ 'eslint/no-unused-private-class-members': "error";
299
+ 'eslint/no-unused-vars': "warn";
300
+ 'eslint/no-useless-backreference': "error";
301
+ 'eslint/no-useless-catch': "error";
302
+ 'eslint/no-useless-escape': "error";
303
+ 'eslint/require-yield': "error";
304
+ 'eslint/use-isnan': "error";
305
+ 'eslint/valid-typeof': "error";
306
+ 'eslint/no-unused-expressions': "warn";
307
+ 'typescript/ban-ts-comment': "error";
308
+ 'typescript/no-duplicate-enum-values': "off";
309
+ 'typescript/no-empty-object-type': "error";
310
+ 'typescript/no-explicit-any': "error";
311
+ 'typescript/no-extra-non-null-assertion': "error";
312
+ 'typescript/no-misused-new': "error";
313
+ 'typescript/no-namespace': "error";
314
+ 'typescript/no-non-null-asserted-optional-chain': "error";
315
+ 'typescript/no-require-imports': "error";
316
+ 'typescript/no-this-alias': "error";
317
+ 'typescript/no-unnecessary-type-constraint': "error";
318
+ 'typescript/no-unsafe-declaration-merging': "error";
319
+ 'typescript/no-unsafe-function-type': "error";
320
+ 'typescript/no-wrapper-object-types': "error";
321
+ 'typescript/prefer-as-const': "error";
322
+ 'typescript/triple-slash-reference': "error";
323
+ 'typescript/explicit-member-accessibility': ["warn", {
324
+ accessibility: string;
325
+ }];
326
+ 'eslint/id-length': "off";
327
+ 'eslint/sort-keys': "off";
328
+ 'eslint/capitalized-comments': "off";
329
+ 'eslint/func-style': "off";
330
+ 'eslint/complexity': "off";
331
+ 'eslint/max-params': "off";
332
+ 'eslint/no-ternary': "off";
333
+ 'eslint/curly': "warn";
334
+ 'typescript/consistent-type-definitions': ["warn", string];
335
+ 'eslint/max-statements': "off";
336
+ 'typescript/consistent-return': "off";
337
+ 'unicorn/switch-case-braces': "warn";
338
+ 'typescript/prefer-regexp-exec': "warn";
339
+ 'eslint/init-declarations': "off";
340
+ 'unicorn/no-null': "off";
341
+ 'eslint/no-undefined': "off";
342
+ 'eslint/no-console': "off";
343
+ 'eslint/no-continue': "off";
344
+ 'eslint/no-implicit-coercion': ["warn", {
345
+ allow: string[];
346
+ }];
347
+ 'eslint/no-plusplus': "off";
348
+ 'eslint/no-void': "off";
349
+ 'eslint/no-nested-ternary': "off";
350
+ 'eslint/no-empty-function': ["warn", {
351
+ allow: string[];
352
+ }];
353
+ 'unicorn/no-instanceof-builtins': "off";
354
+ 'unicorn/prefer-spread': "off";
355
+ 'eslint/new-cap': "off";
356
+ 'unicorn/no-await-expression-member': "off";
357
+ 'eslint/no-duplicate-imports': ["warn", {
358
+ allowSeparateTypeImports: boolean;
359
+ }];
360
+ 'import/no-named-export': "off";
361
+ 'import/no-default-export': "off";
362
+ 'import/prefer-default-export': "off";
363
+ 'import/no-namespace': "off";
364
+ 'import/exports-last': "off";
365
+ 'import/no-unassigned-import': "off";
366
+ 'import/group-exports': "off";
367
+ 'import/consistent-type-specifier-style': "off";
368
+ 'unicorn/no-new-array': "off";
369
+ 'eslint/no-array-constructor': "warn";
370
+ 'typescript/explicit-function-return-type': "off";
371
+ 'typescript/explicit-module-boundary-types': "off";
372
+ 'unicorn/no-anonymous-default-export': "off";
373
+ 'eslint/sort-imports': "off";
374
+ 'import/no-relative-parent-imports': "off";
375
+ 'eslint/no-magic-numbers': "off";
376
+ 'unicorn/prefer-modern-math-apis': "off";
377
+ 'eslint/no-use-before-define': "off";
378
+ 'eslint/constructor-super': "off";
379
+ 'eslint/getter-return': "off";
380
+ 'eslint/no-dupe-class-members': "off";
381
+ 'eslint/no-dupe-keys': "off";
382
+ 'eslint/no-new-native-nonconstructor': "off";
383
+ 'eslint/no-setter-return': "off";
384
+ 'eslint/no-this-before-super': "off";
385
+ 'eslint/no-undef': "off";
386
+ 'eslint/no-unreachable': "off";
387
+ 'eslint/no-with': "off";
388
+ 'unicorn/no-nested-ternary': "off";
389
+ 'oxc/no-optional-chaining': "off";
390
+ 'oxc/no-rest-spread-properties': "off";
391
+ 'oxc/no-async-await': "off";
288
392
  };
289
- overrides: {
290
- files: string[];
291
- rules: {
292
- 'constructor-super': "off";
293
- 'getter-return': "off";
294
- 'no-class-assign': "off";
295
- 'no-const-assign': "off";
296
- 'no-dupe-class-members': "off";
297
- 'no-dupe-keys': "off";
298
- 'no-func-assign': "off";
299
- 'no-import-assign': "off";
300
- 'no-new-native-nonconstructor': "off";
301
- 'no-obj-calls': "off";
302
- 'no-redeclare': "off";
303
- 'no-setter-return': "off";
304
- 'no-this-before-super': "off";
305
- 'no-undef': "off";
306
- 'no-unreachable': "off";
307
- 'no-unsafe-negation': "off";
308
- 'no-var': "error";
309
- 'no-with': "off";
310
- 'prefer-const': "error";
311
- 'prefer-rest-params': "error";
312
- 'prefer-spread': "error";
313
- };
314
- }[];
315
393
  }[];
316
- plugins: "react"[];
394
+ plugins: ("react" | "unicorn" | "typescript" | "import")[];
317
395
  jsPlugins: {
318
396
  name: string;
319
397
  specifier: string;
320
398
  }[];
321
399
  rules: {
322
- 'react-hooks-js/rules-of-hooks': "error";
323
- 'react-hooks-js/exhaustive-deps': "warn";
400
+ 'react/rules-of-hooks': "error";
401
+ 'react/exhaustive-deps': "warn";
324
402
  'react-hooks-js/set-state-in-effect': "warn";
325
- 'react-refresh-js/only-export-components': "error";
403
+ 'react/only-export-components': "error";
326
404
  'react-compiler-js/react-compiler': "error";
405
+ 'react/jsx-filename-extension': "off";
406
+ 'react/jsx-max-depth': "off";
407
+ 'react/no-multi-comp': "off";
408
+ 'react/jsx-props-no-spreading': "off";
409
+ 'react/forbid-component-props': "off";
410
+ 'react/forbid-dom-props': "off";
327
411
  };
328
412
  overrides: {
329
413
  files: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAI9B,iBAAS,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEpD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,wBAA6B"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAI9B,iBAAS,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkFnD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,wBAA6B"}
package/dist/react.js CHANGED
@@ -1,22 +1,35 @@
1
1
  import { defineConfig } from 'oxlint';
2
2
  import { baseConfig } from './base.js';
3
3
  // const DEFAULT_OPTIONS: ReactOptions = {};
4
- function reactConfig(_options) {
4
+ function reactConfig(options) {
5
5
  // const opts = { ...DEFAULT_OPTIONS, ...options };
6
+ const base = baseConfig(options);
6
7
  return defineConfig({
7
- extends: [baseConfig()],
8
- plugins: ['react'],
8
+ extends: [base],
9
+ plugins: [...base.plugins, 'react'],
9
10
  jsPlugins: [
11
+ // react compiler is not yet supported by oxc
12
+ // https://github.com/oxc-project/oxc/issues/10048
13
+ // this means compiler related rules are not yet supported
14
+ // https://github.com/oxc-project/oxc/issues/1022
15
+ // react compiler port to rust may enable compiler related rules
16
+ // https://github.com/facebook/react/pull/36173
10
17
  { name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
11
- { name: 'react-refresh-js', specifier: 'eslint-plugin-react-refresh' },
12
18
  { name: 'react-compiler-js', specifier: 'eslint-plugin-react-compiler' },
13
19
  ],
14
20
  rules: {
15
- 'react-hooks-js/rules-of-hooks': 'error',
16
- 'react-hooks-js/exhaustive-deps': 'warn',
21
+ 'react/rules-of-hooks': 'error',
22
+ 'react/exhaustive-deps': 'warn',
17
23
  'react-hooks-js/set-state-in-effect': 'warn',
18
- 'react-refresh-js/only-export-components': 'error',
24
+ 'react/only-export-components': 'error',
19
25
  'react-compiler-js/react-compiler': 'error',
26
+ 'react/jsx-filename-extension': 'off',
27
+ 'react/jsx-max-depth': 'off',
28
+ 'react/no-multi-comp': 'off',
29
+ 'react/jsx-props-no-spreading': 'off',
30
+ // conflicts with tailwind
31
+ 'react/forbid-component-props': 'off',
32
+ 'react/forbid-dom-props': 'off',
20
33
  },
21
34
  overrides: [
22
35
  {