@4mbl/lint 1.0.0-beta.27 → 1.0.0-beta.29
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/CHANGELOG.md +12 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +23 -0
- package/dist/config.js.map +1 -0
- package/dist/next.d.ts +2 -540
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +3 -3
- package/dist/next.js.map +1 -1
- package/dist/node.d.ts +2 -350
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2 -4
- package/dist/node.js.map +1 -1
- package/dist/react.d.ts +2 -460
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +27 -15
- package/dist/react.js.map +1 -1
- package/package.json +1 -3
package/dist/react.d.ts
CHANGED
|
@@ -1,465 +1,7 @@
|
|
|
1
1
|
import { defineConfig, type OxlintConfig } from 'oxlint';
|
|
2
2
|
export type ReactOptions = {};
|
|
3
|
-
declare function reactConfig(options?: Partial<ReactOptions>):
|
|
4
|
-
extends: {
|
|
5
|
-
plugins: ("import" | "typescript" | "unicorn")[];
|
|
6
|
-
jsPlugins: never[];
|
|
7
|
-
categories: {
|
|
8
|
-
correctness: "error";
|
|
9
|
-
suspicious: "warn";
|
|
10
|
-
pedantic: "off";
|
|
11
|
-
perf: "warn";
|
|
12
|
-
style: "warn";
|
|
13
|
-
restriction: "warn";
|
|
14
|
-
nursery: "off";
|
|
15
|
-
};
|
|
16
|
-
env: {
|
|
17
|
-
builtin: true;
|
|
18
|
-
};
|
|
19
|
-
options: {
|
|
20
|
-
typeAware: true;
|
|
21
|
-
typeCheck: true;
|
|
22
|
-
};
|
|
23
|
-
rules: {
|
|
24
|
-
'eslint/no-var': "warn";
|
|
25
|
-
'eslint/prefer-const': "error";
|
|
26
|
-
'eslint/prefer-rest-params': "error";
|
|
27
|
-
'eslint/prefer-spread': "error";
|
|
28
|
-
'eslint/no-async-promise-executor': "error";
|
|
29
|
-
'eslint/no-case-declarations': "error";
|
|
30
|
-
'eslint/no-class-assign': "error";
|
|
31
|
-
'eslint/no-compare-neg-zero': "error";
|
|
32
|
-
'eslint/no-cond-assign': "error";
|
|
33
|
-
'eslint/no-const-assign': "error";
|
|
34
|
-
'eslint/no-constant-binary-expression': "error";
|
|
35
|
-
'eslint/no-constant-condition': "error";
|
|
36
|
-
'eslint/no-control-regex': "error";
|
|
37
|
-
'eslint/no-debugger': "error";
|
|
38
|
-
'eslint/no-delete-var': "error";
|
|
39
|
-
'eslint/no-dupe-else-if': "error";
|
|
40
|
-
'eslint/no-duplicate-case': "error";
|
|
41
|
-
'eslint/no-empty': "error";
|
|
42
|
-
'eslint/no-empty-character-class': "error";
|
|
43
|
-
'eslint/no-empty-pattern': "error";
|
|
44
|
-
'eslint/no-empty-static-block': "error";
|
|
45
|
-
'eslint/no-ex-assign': "error";
|
|
46
|
-
'eslint/no-extra-boolean-cast': "error";
|
|
47
|
-
'eslint/no-fallthrough': ["error", {
|
|
48
|
-
allowEmptyCase: boolean;
|
|
49
|
-
}];
|
|
50
|
-
'eslint/no-func-assign': "error";
|
|
51
|
-
'eslint/no-global-assign': "error";
|
|
52
|
-
'eslint/no-import-assign': "error";
|
|
53
|
-
'eslint/no-invalid-regexp': "error";
|
|
54
|
-
'eslint/no-irregular-whitespace': "error";
|
|
55
|
-
'eslint/no-loss-of-precision': "error";
|
|
56
|
-
'eslint/no-misleading-character-class': "error";
|
|
57
|
-
'eslint/no-nonoctal-decimal-escape': "error";
|
|
58
|
-
'eslint/no-obj-calls': "error";
|
|
59
|
-
'eslint/no-prototype-builtins': "error";
|
|
60
|
-
'eslint/no-redeclare': "error";
|
|
61
|
-
'eslint/no-regex-spaces': "error";
|
|
62
|
-
'eslint/no-self-assign': "error";
|
|
63
|
-
'eslint/no-shadow-restricted-names': "error";
|
|
64
|
-
'eslint/no-sparse-arrays': "error";
|
|
65
|
-
'eslint/no-unexpected-multiline': "error";
|
|
66
|
-
'eslint/no-unsafe-finally': "error";
|
|
67
|
-
'eslint/no-unsafe-negation': "error";
|
|
68
|
-
'eslint/no-unsafe-optional-chaining': "error";
|
|
69
|
-
'eslint/no-unused-labels': "error";
|
|
70
|
-
'eslint/no-unused-private-class-members': "error";
|
|
71
|
-
'eslint/no-unused-vars': "warn";
|
|
72
|
-
'eslint/no-useless-backreference': "error";
|
|
73
|
-
'eslint/no-useless-catch': "error";
|
|
74
|
-
'eslint/no-useless-escape': "error";
|
|
75
|
-
'eslint/require-yield': "error";
|
|
76
|
-
'eslint/use-isnan': "error";
|
|
77
|
-
'eslint/valid-typeof': "error";
|
|
78
|
-
'eslint/no-unused-expressions': "warn";
|
|
79
|
-
'typescript/ban-ts-comment': "error";
|
|
80
|
-
'typescript/no-duplicate-enum-values': "off";
|
|
81
|
-
'typescript/no-empty-object-type': "error";
|
|
82
|
-
'typescript/no-explicit-any': "error";
|
|
83
|
-
'typescript/no-extra-non-null-assertion': "error";
|
|
84
|
-
'typescript/no-misused-new': "error";
|
|
85
|
-
'typescript/no-namespace': "error";
|
|
86
|
-
'typescript/no-non-null-asserted-optional-chain': "error";
|
|
87
|
-
'typescript/no-require-imports': "error";
|
|
88
|
-
'typescript/no-this-alias': "error";
|
|
89
|
-
'typescript/no-unnecessary-type-constraint': "error";
|
|
90
|
-
'typescript/no-unsafe-declaration-merging': "error";
|
|
91
|
-
'typescript/no-unsafe-function-type': "error";
|
|
92
|
-
'typescript/no-wrapper-object-types': "error";
|
|
93
|
-
'typescript/prefer-as-const': "error";
|
|
94
|
-
'typescript/triple-slash-reference': "error";
|
|
95
|
-
'typescript/explicit-member-accessibility': ["warn", {
|
|
96
|
-
accessibility: "no-public";
|
|
97
|
-
}];
|
|
98
|
-
'eslint/id-length': "off";
|
|
99
|
-
'eslint/sort-keys': "off";
|
|
100
|
-
'eslint/capitalized-comments': "off";
|
|
101
|
-
'eslint/func-style': "off";
|
|
102
|
-
'eslint/complexity': "off";
|
|
103
|
-
'eslint/max-params': "off";
|
|
104
|
-
'eslint/no-ternary': "off";
|
|
105
|
-
'eslint/curly': "warn";
|
|
106
|
-
'typescript/consistent-type-definitions': ["warn", "type"];
|
|
107
|
-
'eslint/max-statements': "off";
|
|
108
|
-
'typescript/consistent-return': "off";
|
|
109
|
-
'unicorn/switch-case-braces': "warn";
|
|
110
|
-
'typescript/prefer-regexp-exec': "warn";
|
|
111
|
-
'eslint/init-declarations': "off";
|
|
112
|
-
'unicorn/no-null': "off";
|
|
113
|
-
'eslint/no-undefined': "off";
|
|
114
|
-
'eslint/no-console': "off";
|
|
115
|
-
'eslint/no-continue': "off";
|
|
116
|
-
'eslint/no-implicit-coercion': ["warn", {
|
|
117
|
-
allow: string[];
|
|
118
|
-
}];
|
|
119
|
-
'eslint/no-plusplus': "off";
|
|
120
|
-
'eslint/no-void': "off";
|
|
121
|
-
'eslint/no-nested-ternary': "off";
|
|
122
|
-
'eslint/no-empty-function': ["warn", {
|
|
123
|
-
allow: string[];
|
|
124
|
-
}];
|
|
125
|
-
'unicorn/no-instanceof-builtins': "off";
|
|
126
|
-
'unicorn/prefer-spread': "off";
|
|
127
|
-
'eslint/new-cap': "off";
|
|
128
|
-
'unicorn/no-await-expression-member': "off";
|
|
129
|
-
'eslint/no-duplicate-imports': ["warn", {
|
|
130
|
-
allowSeparateTypeImports: boolean;
|
|
131
|
-
}];
|
|
132
|
-
'import/no-named-export': "off";
|
|
133
|
-
'import/no-default-export': "off";
|
|
134
|
-
'import/prefer-default-export': "off";
|
|
135
|
-
'import/no-namespace': "off";
|
|
136
|
-
'import/exports-last': "off";
|
|
137
|
-
'import/no-unassigned-import': "off";
|
|
138
|
-
'import/group-exports': "off";
|
|
139
|
-
'import/consistent-type-specifier-style': "off";
|
|
140
|
-
'unicorn/no-new-array': "off";
|
|
141
|
-
'eslint/no-array-constructor': "warn";
|
|
142
|
-
'typescript/explicit-function-return-type': "off";
|
|
143
|
-
'typescript/explicit-module-boundary-types': "off";
|
|
144
|
-
'unicorn/no-anonymous-default-export': "off";
|
|
145
|
-
'eslint/sort-imports': "off";
|
|
146
|
-
'import/no-relative-parent-imports': "off";
|
|
147
|
-
'unicorn/max-nested-calls': "off";
|
|
148
|
-
'eslint/no-magic-numbers': "off";
|
|
149
|
-
'unicorn/prefer-modern-math-apis': "off";
|
|
150
|
-
'eslint/no-use-before-define': "off";
|
|
151
|
-
'eslint/constructor-super': "off";
|
|
152
|
-
'eslint/getter-return': "off";
|
|
153
|
-
'eslint/no-dupe-class-members': "off";
|
|
154
|
-
'eslint/no-dupe-keys': "off";
|
|
155
|
-
'eslint/no-new-native-nonconstructor': "off";
|
|
156
|
-
'eslint/no-setter-return': "off";
|
|
157
|
-
'eslint/no-this-before-super': "off";
|
|
158
|
-
'eslint/no-undef': "off";
|
|
159
|
-
'eslint/no-unreachable': "off";
|
|
160
|
-
'eslint/no-with': "off";
|
|
161
|
-
'unicorn/no-nested-ternary': "off";
|
|
162
|
-
'oxc/no-optional-chaining': "off";
|
|
163
|
-
'oxc/no-rest-spread-properties': "off";
|
|
164
|
-
'oxc/no-async-await': "off";
|
|
165
|
-
};
|
|
166
|
-
}[];
|
|
167
|
-
plugins: ("import" | "jsx-a11y" | "react" | "typescript" | "unicorn")[];
|
|
168
|
-
jsPlugins: {
|
|
169
|
-
name: string;
|
|
170
|
-
specifier: string;
|
|
171
|
-
}[];
|
|
172
|
-
env: {
|
|
173
|
-
browser: true;
|
|
174
|
-
node: true;
|
|
175
|
-
};
|
|
176
|
-
globals: {
|
|
177
|
-
AudioWorkletGlobalScope: "readonly";
|
|
178
|
-
AudioWorkletProcessor: "readonly";
|
|
179
|
-
currentFrame: "readonly";
|
|
180
|
-
currentTime: "readonly";
|
|
181
|
-
registerProcessor: "readonly";
|
|
182
|
-
sampleRate: "readonly";
|
|
183
|
-
WorkletGlobalScope: "readonly";
|
|
184
|
-
};
|
|
185
|
-
rules: {
|
|
186
|
-
'react/rules-of-hooks': "error";
|
|
187
|
-
'react/exhaustive-deps': "warn";
|
|
188
|
-
'react-hooks-js/set-state-in-effect': "warn";
|
|
189
|
-
'react/only-export-components': "error";
|
|
190
|
-
'react-compiler-js/react-compiler': "error";
|
|
191
|
-
'import/no-anonymous-default-export': "warn";
|
|
192
|
-
'react/jsx-filename-extension': "off";
|
|
193
|
-
'react/jsx-max-depth': "off";
|
|
194
|
-
'react/no-multi-comp': "off";
|
|
195
|
-
'react/jsx-props-no-spreading': "off";
|
|
196
|
-
'react/jsx-no-literals': "off";
|
|
197
|
-
'react/forbid-component-props': "off";
|
|
198
|
-
'react/forbid-dom-props': "off";
|
|
199
|
-
};
|
|
200
|
-
overrides: {
|
|
201
|
-
files: string[];
|
|
202
|
-
rules: {
|
|
203
|
-
'react/display-name': "error";
|
|
204
|
-
'react/jsx-key': "error";
|
|
205
|
-
'react/jsx-no-comment-textnodes': "error";
|
|
206
|
-
'react/jsx-no-duplicate-props': "error";
|
|
207
|
-
'react/jsx-no-target-blank': "off";
|
|
208
|
-
'react/jsx-no-undef': "error";
|
|
209
|
-
'react/no-children-prop': "error";
|
|
210
|
-
'react/no-danger-with-children': "error";
|
|
211
|
-
'react/no-direct-mutation-state': "error";
|
|
212
|
-
'react/no-find-dom-node': "error";
|
|
213
|
-
'react/no-is-mounted': "error";
|
|
214
|
-
'react/no-render-return-value': "error";
|
|
215
|
-
'react/no-string-refs': "error";
|
|
216
|
-
'react/no-unescaped-entities': "error";
|
|
217
|
-
'react/no-unknown-property': "off";
|
|
218
|
-
'react/no-unsafe': "off";
|
|
219
|
-
'react/react-in-jsx-scope': "off";
|
|
220
|
-
'react/require-render-return': "error";
|
|
221
|
-
'jsx-a11y/alt-text': ["warn", {
|
|
222
|
-
elements: "img"[];
|
|
223
|
-
img: string[];
|
|
224
|
-
}];
|
|
225
|
-
'jsx-a11y/aria-props': "warn";
|
|
226
|
-
'jsx-a11y/aria-proptypes': "warn";
|
|
227
|
-
'jsx-a11y/aria-unsupported-elements': "warn";
|
|
228
|
-
'jsx-a11y/role-has-required-aria-props': "warn";
|
|
229
|
-
'jsx-a11y/role-supports-aria-props': "warn";
|
|
230
|
-
};
|
|
231
|
-
}[];
|
|
232
|
-
};
|
|
3
|
+
declare function reactConfig(options?: Partial<ReactOptions>): OxlintConfig;
|
|
233
4
|
export { type OxlintConfig, defineConfig, reactConfig };
|
|
234
|
-
declare const _default:
|
|
235
|
-
extends: {
|
|
236
|
-
plugins: ("import" | "typescript" | "unicorn")[];
|
|
237
|
-
jsPlugins: never[];
|
|
238
|
-
categories: {
|
|
239
|
-
correctness: "error";
|
|
240
|
-
suspicious: "warn";
|
|
241
|
-
pedantic: "off";
|
|
242
|
-
perf: "warn";
|
|
243
|
-
style: "warn";
|
|
244
|
-
restriction: "warn";
|
|
245
|
-
nursery: "off";
|
|
246
|
-
};
|
|
247
|
-
env: {
|
|
248
|
-
builtin: true;
|
|
249
|
-
};
|
|
250
|
-
options: {
|
|
251
|
-
typeAware: true;
|
|
252
|
-
typeCheck: true;
|
|
253
|
-
};
|
|
254
|
-
rules: {
|
|
255
|
-
'eslint/no-var': "warn";
|
|
256
|
-
'eslint/prefer-const': "error";
|
|
257
|
-
'eslint/prefer-rest-params': "error";
|
|
258
|
-
'eslint/prefer-spread': "error";
|
|
259
|
-
'eslint/no-async-promise-executor': "error";
|
|
260
|
-
'eslint/no-case-declarations': "error";
|
|
261
|
-
'eslint/no-class-assign': "error";
|
|
262
|
-
'eslint/no-compare-neg-zero': "error";
|
|
263
|
-
'eslint/no-cond-assign': "error";
|
|
264
|
-
'eslint/no-const-assign': "error";
|
|
265
|
-
'eslint/no-constant-binary-expression': "error";
|
|
266
|
-
'eslint/no-constant-condition': "error";
|
|
267
|
-
'eslint/no-control-regex': "error";
|
|
268
|
-
'eslint/no-debugger': "error";
|
|
269
|
-
'eslint/no-delete-var': "error";
|
|
270
|
-
'eslint/no-dupe-else-if': "error";
|
|
271
|
-
'eslint/no-duplicate-case': "error";
|
|
272
|
-
'eslint/no-empty': "error";
|
|
273
|
-
'eslint/no-empty-character-class': "error";
|
|
274
|
-
'eslint/no-empty-pattern': "error";
|
|
275
|
-
'eslint/no-empty-static-block': "error";
|
|
276
|
-
'eslint/no-ex-assign': "error";
|
|
277
|
-
'eslint/no-extra-boolean-cast': "error";
|
|
278
|
-
'eslint/no-fallthrough': ["error", {
|
|
279
|
-
allowEmptyCase: boolean;
|
|
280
|
-
}];
|
|
281
|
-
'eslint/no-func-assign': "error";
|
|
282
|
-
'eslint/no-global-assign': "error";
|
|
283
|
-
'eslint/no-import-assign': "error";
|
|
284
|
-
'eslint/no-invalid-regexp': "error";
|
|
285
|
-
'eslint/no-irregular-whitespace': "error";
|
|
286
|
-
'eslint/no-loss-of-precision': "error";
|
|
287
|
-
'eslint/no-misleading-character-class': "error";
|
|
288
|
-
'eslint/no-nonoctal-decimal-escape': "error";
|
|
289
|
-
'eslint/no-obj-calls': "error";
|
|
290
|
-
'eslint/no-prototype-builtins': "error";
|
|
291
|
-
'eslint/no-redeclare': "error";
|
|
292
|
-
'eslint/no-regex-spaces': "error";
|
|
293
|
-
'eslint/no-self-assign': "error";
|
|
294
|
-
'eslint/no-shadow-restricted-names': "error";
|
|
295
|
-
'eslint/no-sparse-arrays': "error";
|
|
296
|
-
'eslint/no-unexpected-multiline': "error";
|
|
297
|
-
'eslint/no-unsafe-finally': "error";
|
|
298
|
-
'eslint/no-unsafe-negation': "error";
|
|
299
|
-
'eslint/no-unsafe-optional-chaining': "error";
|
|
300
|
-
'eslint/no-unused-labels': "error";
|
|
301
|
-
'eslint/no-unused-private-class-members': "error";
|
|
302
|
-
'eslint/no-unused-vars': "warn";
|
|
303
|
-
'eslint/no-useless-backreference': "error";
|
|
304
|
-
'eslint/no-useless-catch': "error";
|
|
305
|
-
'eslint/no-useless-escape': "error";
|
|
306
|
-
'eslint/require-yield': "error";
|
|
307
|
-
'eslint/use-isnan': "error";
|
|
308
|
-
'eslint/valid-typeof': "error";
|
|
309
|
-
'eslint/no-unused-expressions': "warn";
|
|
310
|
-
'typescript/ban-ts-comment': "error";
|
|
311
|
-
'typescript/no-duplicate-enum-values': "off";
|
|
312
|
-
'typescript/no-empty-object-type': "error";
|
|
313
|
-
'typescript/no-explicit-any': "error";
|
|
314
|
-
'typescript/no-extra-non-null-assertion': "error";
|
|
315
|
-
'typescript/no-misused-new': "error";
|
|
316
|
-
'typescript/no-namespace': "error";
|
|
317
|
-
'typescript/no-non-null-asserted-optional-chain': "error";
|
|
318
|
-
'typescript/no-require-imports': "error";
|
|
319
|
-
'typescript/no-this-alias': "error";
|
|
320
|
-
'typescript/no-unnecessary-type-constraint': "error";
|
|
321
|
-
'typescript/no-unsafe-declaration-merging': "error";
|
|
322
|
-
'typescript/no-unsafe-function-type': "error";
|
|
323
|
-
'typescript/no-wrapper-object-types': "error";
|
|
324
|
-
'typescript/prefer-as-const': "error";
|
|
325
|
-
'typescript/triple-slash-reference': "error";
|
|
326
|
-
'typescript/explicit-member-accessibility': ["warn", {
|
|
327
|
-
accessibility: "no-public";
|
|
328
|
-
}];
|
|
329
|
-
'eslint/id-length': "off";
|
|
330
|
-
'eslint/sort-keys': "off";
|
|
331
|
-
'eslint/capitalized-comments': "off";
|
|
332
|
-
'eslint/func-style': "off";
|
|
333
|
-
'eslint/complexity': "off";
|
|
334
|
-
'eslint/max-params': "off";
|
|
335
|
-
'eslint/no-ternary': "off";
|
|
336
|
-
'eslint/curly': "warn";
|
|
337
|
-
'typescript/consistent-type-definitions': ["warn", "type"];
|
|
338
|
-
'eslint/max-statements': "off";
|
|
339
|
-
'typescript/consistent-return': "off";
|
|
340
|
-
'unicorn/switch-case-braces': "warn";
|
|
341
|
-
'typescript/prefer-regexp-exec': "warn";
|
|
342
|
-
'eslint/init-declarations': "off";
|
|
343
|
-
'unicorn/no-null': "off";
|
|
344
|
-
'eslint/no-undefined': "off";
|
|
345
|
-
'eslint/no-console': "off";
|
|
346
|
-
'eslint/no-continue': "off";
|
|
347
|
-
'eslint/no-implicit-coercion': ["warn", {
|
|
348
|
-
allow: string[];
|
|
349
|
-
}];
|
|
350
|
-
'eslint/no-plusplus': "off";
|
|
351
|
-
'eslint/no-void': "off";
|
|
352
|
-
'eslint/no-nested-ternary': "off";
|
|
353
|
-
'eslint/no-empty-function': ["warn", {
|
|
354
|
-
allow: string[];
|
|
355
|
-
}];
|
|
356
|
-
'unicorn/no-instanceof-builtins': "off";
|
|
357
|
-
'unicorn/prefer-spread': "off";
|
|
358
|
-
'eslint/new-cap': "off";
|
|
359
|
-
'unicorn/no-await-expression-member': "off";
|
|
360
|
-
'eslint/no-duplicate-imports': ["warn", {
|
|
361
|
-
allowSeparateTypeImports: boolean;
|
|
362
|
-
}];
|
|
363
|
-
'import/no-named-export': "off";
|
|
364
|
-
'import/no-default-export': "off";
|
|
365
|
-
'import/prefer-default-export': "off";
|
|
366
|
-
'import/no-namespace': "off";
|
|
367
|
-
'import/exports-last': "off";
|
|
368
|
-
'import/no-unassigned-import': "off";
|
|
369
|
-
'import/group-exports': "off";
|
|
370
|
-
'import/consistent-type-specifier-style': "off";
|
|
371
|
-
'unicorn/no-new-array': "off";
|
|
372
|
-
'eslint/no-array-constructor': "warn";
|
|
373
|
-
'typescript/explicit-function-return-type': "off";
|
|
374
|
-
'typescript/explicit-module-boundary-types': "off";
|
|
375
|
-
'unicorn/no-anonymous-default-export': "off";
|
|
376
|
-
'eslint/sort-imports': "off";
|
|
377
|
-
'import/no-relative-parent-imports': "off";
|
|
378
|
-
'unicorn/max-nested-calls': "off";
|
|
379
|
-
'eslint/no-magic-numbers': "off";
|
|
380
|
-
'unicorn/prefer-modern-math-apis': "off";
|
|
381
|
-
'eslint/no-use-before-define': "off";
|
|
382
|
-
'eslint/constructor-super': "off";
|
|
383
|
-
'eslint/getter-return': "off";
|
|
384
|
-
'eslint/no-dupe-class-members': "off";
|
|
385
|
-
'eslint/no-dupe-keys': "off";
|
|
386
|
-
'eslint/no-new-native-nonconstructor': "off";
|
|
387
|
-
'eslint/no-setter-return': "off";
|
|
388
|
-
'eslint/no-this-before-super': "off";
|
|
389
|
-
'eslint/no-undef': "off";
|
|
390
|
-
'eslint/no-unreachable': "off";
|
|
391
|
-
'eslint/no-with': "off";
|
|
392
|
-
'unicorn/no-nested-ternary': "off";
|
|
393
|
-
'oxc/no-optional-chaining': "off";
|
|
394
|
-
'oxc/no-rest-spread-properties': "off";
|
|
395
|
-
'oxc/no-async-await': "off";
|
|
396
|
-
};
|
|
397
|
-
}[];
|
|
398
|
-
plugins: ("import" | "jsx-a11y" | "react" | "typescript" | "unicorn")[];
|
|
399
|
-
jsPlugins: {
|
|
400
|
-
name: string;
|
|
401
|
-
specifier: string;
|
|
402
|
-
}[];
|
|
403
|
-
env: {
|
|
404
|
-
browser: true;
|
|
405
|
-
node: true;
|
|
406
|
-
};
|
|
407
|
-
globals: {
|
|
408
|
-
AudioWorkletGlobalScope: "readonly";
|
|
409
|
-
AudioWorkletProcessor: "readonly";
|
|
410
|
-
currentFrame: "readonly";
|
|
411
|
-
currentTime: "readonly";
|
|
412
|
-
registerProcessor: "readonly";
|
|
413
|
-
sampleRate: "readonly";
|
|
414
|
-
WorkletGlobalScope: "readonly";
|
|
415
|
-
};
|
|
416
|
-
rules: {
|
|
417
|
-
'react/rules-of-hooks': "error";
|
|
418
|
-
'react/exhaustive-deps': "warn";
|
|
419
|
-
'react-hooks-js/set-state-in-effect': "warn";
|
|
420
|
-
'react/only-export-components': "error";
|
|
421
|
-
'react-compiler-js/react-compiler': "error";
|
|
422
|
-
'import/no-anonymous-default-export': "warn";
|
|
423
|
-
'react/jsx-filename-extension': "off";
|
|
424
|
-
'react/jsx-max-depth': "off";
|
|
425
|
-
'react/no-multi-comp': "off";
|
|
426
|
-
'react/jsx-props-no-spreading': "off";
|
|
427
|
-
'react/jsx-no-literals': "off";
|
|
428
|
-
'react/forbid-component-props': "off";
|
|
429
|
-
'react/forbid-dom-props': "off";
|
|
430
|
-
};
|
|
431
|
-
overrides: {
|
|
432
|
-
files: string[];
|
|
433
|
-
rules: {
|
|
434
|
-
'react/display-name': "error";
|
|
435
|
-
'react/jsx-key': "error";
|
|
436
|
-
'react/jsx-no-comment-textnodes': "error";
|
|
437
|
-
'react/jsx-no-duplicate-props': "error";
|
|
438
|
-
'react/jsx-no-target-blank': "off";
|
|
439
|
-
'react/jsx-no-undef': "error";
|
|
440
|
-
'react/no-children-prop': "error";
|
|
441
|
-
'react/no-danger-with-children': "error";
|
|
442
|
-
'react/no-direct-mutation-state': "error";
|
|
443
|
-
'react/no-find-dom-node': "error";
|
|
444
|
-
'react/no-is-mounted': "error";
|
|
445
|
-
'react/no-render-return-value': "error";
|
|
446
|
-
'react/no-string-refs': "error";
|
|
447
|
-
'react/no-unescaped-entities': "error";
|
|
448
|
-
'react/no-unknown-property': "off";
|
|
449
|
-
'react/no-unsafe': "off";
|
|
450
|
-
'react/react-in-jsx-scope': "off";
|
|
451
|
-
'react/require-render-return': "error";
|
|
452
|
-
'jsx-a11y/alt-text': ["warn", {
|
|
453
|
-
elements: "img"[];
|
|
454
|
-
img: string[];
|
|
455
|
-
}];
|
|
456
|
-
'jsx-a11y/aria-props': "warn";
|
|
457
|
-
'jsx-a11y/aria-proptypes': "warn";
|
|
458
|
-
'jsx-a11y/aria-unsupported-elements': "warn";
|
|
459
|
-
'jsx-a11y/role-has-required-aria-props': "warn";
|
|
460
|
-
'jsx-a11y/role-supports-aria-props': "warn";
|
|
461
|
-
};
|
|
462
|
-
}[];
|
|
463
|
-
};
|
|
5
|
+
declare const _default: OxlintConfig;
|
|
464
6
|
export default _default;
|
|
465
7
|
//# sourceMappingURL=react.d.ts.map
|
package/dist/react.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAIzD,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAI9B,iBAAS,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,gBA6FnD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/react.js
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import { defineConfig } from 'oxlint';
|
|
2
2
|
import { baseConfig } from './base.js';
|
|
3
|
+
import { extendConfig } from './config.js';
|
|
3
4
|
// const DEFAULT_OPTIONS: ReactOptions = {};
|
|
4
5
|
function reactConfig(options) {
|
|
5
6
|
// const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
6
7
|
const base = baseConfig(options);
|
|
7
|
-
return
|
|
8
|
-
|
|
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
|
|
17
|
-
{ name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
|
|
18
|
-
{ name: 'react-compiler-js', specifier: 'eslint-plugin-react-compiler' },
|
|
19
|
-
],
|
|
8
|
+
return extendConfig(base, {
|
|
9
|
+
plugins: ['react', 'jsx-a11y'],
|
|
10
|
+
jsPlugins: [],
|
|
20
11
|
env: {
|
|
21
12
|
browser: true,
|
|
22
13
|
node: true,
|
|
@@ -33,9 +24,30 @@ function reactConfig(options) {
|
|
|
33
24
|
rules: {
|
|
34
25
|
'react/rules-of-hooks': 'error',
|
|
35
26
|
'react/exhaustive-deps': 'warn',
|
|
36
|
-
|
|
27
|
+
// react compiler rules
|
|
28
|
+
'react/error-boundaries': 'error',
|
|
29
|
+
'react/globals': 'error',
|
|
30
|
+
'react/immutability': 'error',
|
|
31
|
+
'react/incompatible-library': 'error',
|
|
32
|
+
'react/preserve-manual-memoization': 'error',
|
|
33
|
+
'react/purity': 'error',
|
|
34
|
+
'react/refs': 'error',
|
|
35
|
+
'react/set-state-in-effect': 'error',
|
|
36
|
+
'react/set-state-in-render': 'error',
|
|
37
|
+
'react/static-components': 'error',
|
|
38
|
+
'react/use-memo': 'error',
|
|
39
|
+
'react/void-use-memo': 'error',
|
|
40
|
+
'react/capitalized-calls': 'error',
|
|
41
|
+
'react/exhaustive-effect-dependencies': 'error',
|
|
42
|
+
'react/hooks': 'error',
|
|
43
|
+
'react/memo-dependencies': 'error',
|
|
44
|
+
'react/no-deriving-state-in-effects': 'error',
|
|
45
|
+
'react/invariant': 'error',
|
|
46
|
+
'react/rule-suppression': 'error',
|
|
47
|
+
'react/syntax': 'error',
|
|
48
|
+
'react/todo': 'error',
|
|
49
|
+
'react/unsupported-syntax': 'error',
|
|
37
50
|
'react/only-export-components': 'error',
|
|
38
|
-
'react-compiler-js/react-compiler': 'error',
|
|
39
51
|
'import/no-anonymous-default-export': 'warn',
|
|
40
52
|
'react/jsx-filename-extension': 'off',
|
|
41
53
|
'react/jsx-max-depth': 'off',
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,4CAA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lint",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.29",
|
|
4
4
|
"description": "Linting configuration for various environments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "4mbl",
|
|
@@ -31,8 +31,6 @@
|
|
|
31
31
|
"lint"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
35
|
-
"eslint-plugin-react-hooks": "7.1.1",
|
|
36
34
|
"oxlint": "1.79.x",
|
|
37
35
|
"oxlint-tsgolint": "7.0.x"
|
|
38
36
|
},
|