|
1 | 1 | { |
2 | 2 | "$schema": "./node_modules/oxlint/configuration_schema.json", |
| 3 | + "categories": { |
| 4 | + "correctness": "deny", |
| 5 | + "nursery": "off", |
| 6 | + "pedantic": "deny", |
| 7 | + "perf": "deny", |
| 8 | + "restriction": "deny", |
| 9 | + "style": "deny", |
| 10 | + "suspicious": "deny" |
| 11 | + }, |
3 | 12 | "ignorePatterns": [ |
4 | 13 | "**/app.config.d.ts", |
5 | 14 | "**/package.config.d.ts", |
|
8 | 17 | "*.d.ts", |
9 | 18 | "svgo.config.mjs" |
10 | 19 | ], |
11 | | - "categories": { |
12 | | - "correctness": "deny", |
13 | | - "style": "deny", |
14 | | - "suspicious": "deny", |
15 | | - "perf": "deny", |
16 | | - "pedantic": "deny", |
17 | | - "restriction": "deny", |
18 | | - "nursery": "off" |
19 | | - }, |
20 | | - "plugins": [ |
21 | | - "import", |
22 | | - "node", |
23 | | - "oxc", |
24 | | - "react", |
25 | | - "typescript", |
26 | | - "unicorn", |
27 | | - "jsx-a11y" |
28 | | - ], |
29 | 20 | "overrides": [ |
30 | 21 | { |
31 | | - "files": ["**/__stories__/**/*.{ts,tsx}", "**/__tests__/**/*.{ts,tsx}", ".storybook/**/*.{ts,tsx}"], |
| 22 | + "files": [ |
| 23 | + "**/__stories__/**/*.{ts,tsx}", |
| 24 | + "**/__tests__/**/*.{ts,tsx}", |
| 25 | + ".storybook/**/*.{ts,tsx}", |
| 26 | + "exemples/**", |
| 27 | + ".storybook/**/*.{ts,tsx}" |
| 28 | + ], |
32 | 29 | "rules": { |
33 | | - "eslint/no-console": "off", |
34 | 30 | "eslint/no-alert": "off", |
| 31 | + "eslint/no-console": "off", |
35 | 32 | "import/no-anonymous-default-export": "off", |
36 | | - "import/no-unassigned-import": "off" |
| 33 | + "import/no-named-export": "off", |
| 34 | + "import/no-unassigned-import": "off", |
| 35 | + "react/jsx-pascal-case": "off", |
| 36 | + "react/only-export-components": "off" |
37 | 37 | } |
38 | 38 | }, |
39 | 39 | { |
|
45 | 45 | "setup.ts", |
46 | 46 | "vitest.setup.ts", |
47 | 47 | "**/vitest.setup.ts", |
48 | | - "*.config.ts" |
| 48 | + "*.config.ts", |
| 49 | + "**/vitest/setup.ts" |
49 | 50 | ], |
50 | 51 | "plugins": ["import", "oxc", "vitest"], |
51 | 52 | "rules": { |
52 | 53 | "@typescript-eslint/consistent-type-imports": "off", |
53 | | - "import/no-namespace": "off", |
54 | 54 | "import/export": "off", |
55 | 55 | "import/no-anonymous-default-export": "off", |
| 56 | + "import/no-named-export": "off", |
| 57 | + "import/no-namespace": "off", |
56 | 58 | "import/no-unassigned-import": "off", |
57 | 59 | "jsx_a11y/label-has-associated-control": "off", |
58 | | - "vitest/prefer-lowercase-title": "error", |
59 | | - "no-console": "off" |
| 60 | + "no-console": "off", |
| 61 | + "node/no-process-env": "off", |
| 62 | + "vitest/prefer-lowercase-title": "error" |
| 63 | + } |
| 64 | + }, |
| 65 | + { |
| 66 | + "files": ["e2e/**/*.{ts,tsx}"], |
| 67 | + "rules": { |
| 68 | + "node/no-process-env": "off" |
60 | 69 | } |
61 | 70 | } |
62 | 71 | ], |
| 72 | + "plugins": [ |
| 73 | + "import", |
| 74 | + "node", |
| 75 | + "oxc", |
| 76 | + "react", |
| 77 | + "typescript", |
| 78 | + "unicorn", |
| 79 | + "jsx-a11y" |
| 80 | + ], |
63 | 81 | "rules": { |
64 | | - "jsx_a11y/label-has-associated-control": "off", |
65 | | - "jsx_a11y/no-autofocus": "off", |
66 | | - "jsx_a11y/prefer-tag-over-role": "off", |
67 | | - "import/default": "error", |
68 | | - "import/export": "off", |
69 | | - "import/exports-last": "off", |
70 | | - "import/max-dependencies": "off", |
71 | | - "import/named": "error", |
72 | | - "import/no-amd": "error", |
73 | | - "import/consistent-type-specifier-style": "error", |
74 | | - "import/group-exports": "off", |
75 | | - "import/import-no-namespace": "off", |
76 | | - "import/namespace": "off", |
77 | | - "import/no-cycle": "error", |
78 | | - "import/no-default-export": "off", |
79 | | - "import/no-duplicates": "error", |
80 | | - "import/no-named-as-default-member": "error", |
81 | | - "import/no-named-as-default": "error", |
82 | | - "import/no-self-import": "error", |
83 | | - "import/no-unassigned-import": "off", |
84 | | - "import/no-unused-modules": "off", |
85 | | - "import/prefer-default-export": "off", |
86 | | - "import/no-namespace": "off", |
87 | | - "import/unambiguous": "error", |
88 | 82 | "@typescript-eslint/adjacent-overload-signatures": "error", |
89 | 83 | "@typescript-eslint/array-type": "error", |
90 | 84 | "@typescript-eslint/ban-ts-comment": "error", |
|
97 | 91 | "@typescript-eslint/no-duplicate-enum-values": "error", |
98 | 92 | "@typescript-eslint/no-empty-interface": "error", |
99 | 93 | "@typescript-eslint/no-explicit-any": "error", |
100 | | - "@typescript-eslint/no-magic-numbers": "off", |
101 | 94 | "@typescript-eslint/no-extra-non-null-assertion": "error", |
| 95 | + "@typescript-eslint/no-magic-numbers": "off", |
102 | 96 | "@typescript-eslint/no-misused-new": "error", |
103 | 97 | "@typescript-eslint/no-namespace": "error", |
104 | 98 | "@typescript-eslint/no-non-null-asserted-optional-chain": "error", |
105 | 99 | "@typescript-eslint/no-non-null-assertion": "off", |
106 | 100 | "@typescript-eslint/no-this-alias": "error", |
107 | 101 | "@typescript-eslint/no-unnecessary-type-constraint": "error", |
108 | 102 | "@typescript-eslint/no-unsafe-declaration-merging": "error", |
| 103 | + "@typescript-eslint/no-unsafe-member-access": "error", |
109 | 104 | "@typescript-eslint/no-var-requires": "error", |
110 | 105 | "@typescript-eslint/prefer-as-const": "error", |
111 | | - "@typescript-eslint/no-unsafe-member-access": "error", |
112 | 106 | "@typescript-eslint/prefer-enum-initializers": "off", |
113 | 107 | "@typescript-eslint/prefer-for-of": "error", |
114 | 108 | "@typescript-eslint/prefer-function-type": "off", |
115 | 109 | "@typescript-eslint/prefer-literal-enum-member": "off", |
116 | 110 | "@typescript-eslint/prefer-ts-expect-error": "off", |
117 | 111 | "@typescript-eslint/triple-slash-reference": "error", |
118 | | - "eslint/yoda": "error", |
| 112 | + "arrow-body-style": "off", |
119 | 113 | "eslint/array-callback-return": "error", |
120 | 114 | "eslint/constructor-super": "error", |
121 | 115 | "eslint/default-case-last": "error", |
122 | 116 | "eslint/default-param-last": "off", |
123 | 117 | "eslint/eqeqeq": "error", |
124 | 118 | "eslint/for-direction": "error", |
| 119 | + "eslint/func-style": "off", |
125 | 120 | "eslint/getter-return": "error", |
126 | 121 | "eslint/guard-for-in": "error", |
| 122 | + "eslint/id-length": "off", |
| 123 | + "eslint/init-declarations": "off", |
127 | 124 | "eslint/max-classes-per-file": "error", |
| 125 | + "eslint/max-depth": "off", |
128 | 126 | "eslint/max-lines": "off", |
| 127 | + "eslint/max-lines-per-function": "off", |
| 128 | + "eslint/max-nested-callbacks": "off", |
129 | 129 | "eslint/max-params": "off", |
130 | 130 | "eslint/no-array-constructor": "error", |
131 | 131 | "eslint/no-async-promise-executor": "error", |
132 | 132 | "eslint/no-await-in-loop": "off", |
133 | 133 | "eslint/no-bitwise": "error", |
134 | 134 | "eslint/no-caller": "error", |
135 | | - "eslint/id-length": "off", |
136 | 135 | "eslint/no-case-declarations": "error", |
137 | 136 | "eslint/no-class-assign": "error", |
138 | 137 | "eslint/no-compare-neg-zero": "error", |
|
150 | 149 | "eslint/no-dupe-keys": "error", |
151 | 150 | "eslint/no-duplicate-case": "error", |
152 | 151 | "eslint/no-duplicate-imports": "off", |
| 152 | + "eslint/no-empty": "error", |
153 | 153 | "eslint/no-empty-character-class": "error", |
154 | 154 | "eslint/no-empty-function": "off", |
155 | 155 | "eslint/no-empty-pattern": "error", |
156 | 156 | "eslint/no-empty-static-block": "error", |
157 | | - "eslint/no-empty": "error", |
158 | 157 | "eslint/no-eq-null": "error", |
159 | 158 | "eslint/no-eval": "error", |
160 | 159 | "eslint/no-ex-assign": "error", |
|
195 | 194 | "eslint/no-unsafe-optional-chaining": "error", |
196 | 195 | "eslint/no-unused-labels": "error", |
197 | 196 | "eslint/no-unused-private-class-members": "error", |
198 | | - "eslint/sort-keys": "off", |
199 | | - "eslint/react-in-jsx-scope": "off", |
200 | 197 | "eslint/no-unused-vars": [ |
201 | 198 | "error", |
202 | 199 | { |
|
210 | 207 | "eslint/no-void": "error", |
211 | 208 | "eslint/no-with": "error", |
212 | 209 | "eslint/radix": "error", |
| 210 | + "eslint/react-in-jsx-scope": "off", |
213 | 211 | "eslint/require-await": "off", |
214 | 212 | "eslint/require-yield": "error", |
215 | 213 | "eslint/sort-imports": [ |
|
219 | 217 | "memberSyntaxSortOrder": ["single", "multiple", "all", "none"] |
220 | 218 | } |
221 | 219 | ], |
| 220 | + "eslint/sort-keys": "off", |
222 | 221 | "eslint/unicode-bom": "error", |
223 | 222 | "eslint/use-isnan": "error", |
224 | 223 | "eslint/valid-typeof": "error", |
225 | | - "eslint/init-declarations": "off", |
226 | | - "eslint/func-style": "off", |
227 | | - "eslint/max-lines-per-function": "off", |
228 | | - "eslint/max-nested-callbacks": "off", |
229 | | - "eslint/max-depth": "off", |
| 224 | + "eslint/yoda": "error", |
| 225 | + "import/consistent-type-specifier-style": "error", |
| 226 | + "import/default": "error", |
| 227 | + "import/export": "off", |
| 228 | + "import/exports-last": "off", |
| 229 | + "import/group-exports": "off", |
| 230 | + "import/import-no-namespace": "off", |
| 231 | + "import/max-dependencies": "off", |
| 232 | + "import/named": "error", |
| 233 | + "import/namespace": "off", |
| 234 | + "import/no-amd": "error", |
| 235 | + "import/no-anonymous-default-export": "off", |
| 236 | + "import/no-cycle": "error", |
| 237 | + "import/no-default-export": "off", |
| 238 | + "import/no-duplicates": "error", |
| 239 | + "import/no-named-as-default": "error", |
| 240 | + "import/no-named-as-default-member": "error", |
| 241 | + "import/no-named-export": "off", |
| 242 | + "import/no-namespace": "off", |
| 243 | + "import/no-self-import": "error", |
| 244 | + "import/no-unassigned-import": "off", |
| 245 | + "import/no-unused-modules": "off", |
| 246 | + "import/prefer-default-export": "off", |
| 247 | + "import/unambiguous": "error", |
| 248 | + "jsx_a11y/label-has-associated-control": "off", |
| 249 | + "jsx_a11y/no-autofocus": "off", |
| 250 | + "jsx_a11y/prefer-tag-over-role": "off", |
230 | 251 | "oxc/bad-bitwise-operator": "error", |
231 | 252 | "oxc/no-accumulating-spread": "off", |
232 | 253 | "oxc/no-async-await": "off", |
233 | 254 | "oxc/no-barrel-file": "off", |
234 | 255 | "oxc/no-const-enum": "error", |
235 | 256 | "oxc/no-optional-chaining": "off", |
236 | 257 | "oxc/no-rest-spread-properties": "off", |
237 | | - "react-perf/jsx-no-jsx-as-prop": "off", |
238 | | - "react-perf/jsx-no-new-array-as-prop": "off", |
239 | | - "react-perf/jsx-no-new-function-as-prop": "off", |
240 | | - "react-perf/jsx-no-new-object-as-prop": "off", |
| 258 | + "prefer-destructuring": "off", |
241 | 259 | "react_perf/jsx-no-jsx-as-prop": "error", |
242 | 260 | "react_perf/jsx-no-new-array-as-prop": "error", |
243 | 261 | "react_perf/jsx-no-new-function-as-props": "error", |
244 | 262 | "react_perf/jsx-no-new-object-as-prop": "error", |
| 263 | + "react-perf/jsx-no-jsx-as-prop": "off", |
| 264 | + "react-perf/jsx-no-new-array-as-prop": "off", |
| 265 | + "react-perf/jsx-no-new-function-as-prop": "off", |
| 266 | + "react-perf/jsx-no-new-object-as-prop": "off", |
245 | 267 | "react/button-has-type": "off", |
246 | 268 | "react/exhaustive-deps": "error", |
| 269 | + "react/iframe-missing-sandbox": "error", |
247 | 270 | "react/jsx-filename-extension": [ |
248 | 271 | "error", |
249 | 272 | { |
250 | 273 | "extensions": [".jsx", ".tsx"] |
251 | 274 | } |
252 | 275 | ], |
253 | | - "react/iframe-missing-sandbox": "error", |
| 276 | + "react/jsx-handler-names": "off", |
254 | 277 | "react/jsx-key": "error", |
255 | 278 | "react/jsx-no-comment-text-nodes": "error", |
256 | 279 | "react/jsx-no-duplicate-props": "error", |
257 | 280 | "react/jsx-no-target-blank": "off", |
258 | 281 | "react/jsx-no-undef": "error", |
259 | 282 | "react/jsx-no-useless-fragment": "off", |
260 | 283 | "react/no-children-prop": "error", |
| 284 | + "react/no-danger": "off", |
261 | 285 | "react/no-dangerously-set-inner-html": "error", |
262 | 286 | "react/no-direct-mutation-state": "error", |
263 | 287 | "react/no-find-dom-node": "error", |
|
269 | 293 | "react/no-unknown-property": "error", |
270 | 294 | "react/react-in-jsx-scope": "off", |
271 | 295 | "react/require-render-return": "error", |
272 | | - "react/no-danger": "off", |
273 | | - "unicorn/no-instanceof-builtins": "error", |
274 | | - "unicorn/prefer-array-index-of": "off", |
275 | | - "unicorn/prefer-array-find": "off", |
276 | | - "unicorn/no-for-loop": "off", |
277 | | - "unicorn/prefer-object-from-entries": "off", |
278 | | - "unicorn/prefer-global-this": "off", |
| 296 | + "typescript/explicit-module-boundary-types": "off", |
279 | 297 | "unicorn/catch-error-name": "error", |
280 | 298 | "unicorn/empty-brace-spaces": "error", |
281 | 299 | "unicorn/error-message": "off", |
|
289 | 307 | "unicorn/no-array-reduce": "off", |
290 | 308 | "unicorn/no-await-expression-member": "off", |
291 | 309 | "unicorn/no-await-in-promise-methods": "off", |
292 | | - "unicorn/prefer-set-has": "off", |
293 | 310 | "unicorn/no-console-spaces": "error", |
294 | 311 | "unicorn/no-document-cookie": "off", |
295 | 312 | "unicorn/no-empty-file": "error", |
| 313 | + "unicorn/no-for-loop": "off", |
296 | 314 | "unicorn/no-hex-escape": "error", |
297 | 315 | "unicorn/no-instanceof-array": "error", |
| 316 | + "unicorn/no-instanceof-builtins": "error", |
298 | 317 | "unicorn/no-invalid-remove-event-listener": "off", |
299 | 318 | "unicorn/no-lonely-if": "error", |
300 | 319 | "unicorn/no-magic-array-flat-depth": "off", |
|
323 | 342 | "unicorn/number-literal-case": "off", |
324 | 343 | "unicorn/numeric-separators-style": "off", |
325 | 344 | "unicorn/prefer-add-event-listener": "off", |
| 345 | + "unicorn/prefer-array-find": "off", |
326 | 346 | "unicorn/prefer-array-flat": "error", |
327 | 347 | "unicorn/prefer-array-flat-map": "error", |
| 348 | + "unicorn/prefer-array-index-of": "off", |
328 | 349 | "unicorn/prefer-array-some": "off", |
| 350 | + "unicorn/prefer-at": "warn", |
329 | 351 | "unicorn/prefer-blob-reading-methods": "off", |
330 | 352 | "unicorn/prefer-code-point": "off", |
331 | 353 | "unicorn/prefer-date-now": "error", |
|
334 | 356 | "unicorn/prefer-dom-node-remove": "off", |
335 | 357 | "unicorn/prefer-dom-node-text-content": "error", |
336 | 358 | "unicorn/prefer-event-target": "error", |
| 359 | + "unicorn/prefer-global-this": "off", |
337 | 360 | "unicorn/prefer-includes": "error", |
338 | 361 | "unicorn/prefer-logical-operator-over-ternary": "off", |
339 | 362 | "unicorn/prefer-math-trunc": "error", |
|
342 | 365 | "unicorn/prefer-native-coercion-functions": "error", |
343 | 366 | "unicorn/prefer-node-protocol": "off", |
344 | 367 | "unicorn/prefer-number-properties": "error", |
| 368 | + "unicorn/prefer-object-from-entries": "off", |
345 | 369 | "unicorn/prefer-optional-catch-binding": "error", |
346 | 370 | "unicorn/prefer-prototype-methods": "error", |
347 | 371 | "unicorn/prefer-query-selector": "off", |
348 | 372 | "unicorn/prefer-reflect-apply": "error", |
349 | 373 | "unicorn/prefer-regexp-test": "error", |
| 374 | + "unicorn/prefer-set-has": "off", |
350 | 375 | "unicorn/prefer-set-size": "error", |
351 | 376 | "unicorn/prefer-spread": "error", |
352 | 377 | "unicorn/prefer-string-replace-all": "off", |
|
358 | 383 | "unicorn/require-number-to-fixed-digits-argument": "error", |
359 | 384 | "unicorn/switch-case-braces": "error", |
360 | 385 | "unicorn/text-encoding-identifier-case": "error", |
361 | | - "unicorn/throw-new-error": "error", |
362 | | - "arrow-body-style": "off", |
363 | | - "typescript/explicit-module-boundary-types": "off", |
364 | | - "prefer-destructuring": "off", |
365 | | - "import/no-anonymous-default-export": "off", |
366 | | - "react/jsx-handler-names": "off" |
| 386 | + "unicorn/throw-new-error": "error" |
367 | 387 | }, |
368 | 388 | "settings": { |
369 | 389 | "jsx-a11y": { |
|
0 commit comments