eslint-config-setup 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/configs/0b23ff88.js +134 -23
- package/dist/configs/12c62446.js +155 -9
- package/dist/configs/196d687e.js +277 -46
- package/dist/configs/1c3f743c.js +157 -9
- package/dist/configs/2f6f3a82.js +303 -39
- package/dist/configs/4eb62e57.js +136 -20
- package/dist/configs/52762a42.js +274 -33
- package/dist/configs/532f50a4.js +476 -49
- package/dist/configs/5a302873.js +301 -39
- package/dist/configs/6bc0d588.js +438 -56
- package/dist/configs/91e82988.js +478 -49
- package/dist/configs/c2fecd3d.js +276 -30
- package/dist/configs/cde010b4.js +309 -16
- package/dist/configs/d537b683.js +440 -53
- package/dist/configs/db69ebb6.js +279 -43
- package/dist/configs/e4b137fa.js +307 -16
- package/dist/index.d.ts +13 -13
- package/dist/index.js +65 -67
- package/dist/index.js.map +1 -1
- package/dist/modules.d.ts +39 -40
- package/dist/modules.js +1136 -1102
- package/dist/modules.js.map +1 -1
- package/dist/oxlint-configs/3047b7d6.json +243 -148
- package/dist/oxlint-configs/58d5e03b.json +242 -148
- package/dist/oxlint-configs/78b40daa.json +274 -158
- package/dist/oxlint-configs/7ff0d87e.json +326 -244
- package/dist/oxlint-configs/85912bf0.json +326 -243
- package/dist/oxlint-configs/9dc42dc3.json +273 -158
- package/dist/oxlint-configs/d46cb9b7.json +351 -246
- package/dist/oxlint-configs/ef643c60.json +352 -246
- package/dist/{types-CAUUIuJR.d.ts → types-CAO1PbsB.d.ts} +7 -7
- package/package.json +32 -31
package/dist/configs/2f6f3a82.js
CHANGED
|
@@ -14,7 +14,6 @@ import packageJsonPlugin from "eslint-plugin-package-json"
|
|
|
14
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
15
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
16
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
|
-
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
18
17
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
19
18
|
import securityPlugin from "eslint-plugin-security"
|
|
20
19
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
@@ -26,13 +25,100 @@ import unicornPlugin from "eslint-plugin-unicorn"
|
|
|
26
25
|
import unusedImportsPlugin from "eslint-plugin-unused-imports"
|
|
27
26
|
import vitestPlugin from "@vitest/eslint-plugin"
|
|
28
27
|
|
|
28
|
+
// React compat plugin — merges @eslint-react sub-plugins into a single `react/` namespace
|
|
29
|
+
// and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
|
|
30
|
+
const reactCompatPlugin = (() => {
|
|
31
|
+
const core = eslintReactPlugin.rules
|
|
32
|
+
const select = (prefix) => Object.fromEntries(
|
|
33
|
+
Object.entries(core)
|
|
34
|
+
.filter(([name]) => name.startsWith(prefix))
|
|
35
|
+
.map(([name, rule]) => [name.slice(prefix.length), rule]),
|
|
36
|
+
)
|
|
37
|
+
const dom = select("dom-")
|
|
38
|
+
const jsx = select("jsx-")
|
|
39
|
+
const naming = select("naming-convention-")
|
|
40
|
+
const rsc = select("rsc-")
|
|
41
|
+
const webApi = select("web-api-")
|
|
42
|
+
|
|
43
|
+
// Legacy aliases: legacy name → [source, original name]
|
|
44
|
+
const aliases = {
|
|
45
|
+
"jsx-key": [core, "no-missing-key"],
|
|
46
|
+
"jsx-key-before-spread": [jsx, "no-key-after-spread"],
|
|
47
|
+
"jsx-no-constructed-context-values": [core, "no-unstable-context-value"],
|
|
48
|
+
"jsx-no-leaked-render": [core, "no-leaked-conditional-rendering"],
|
|
49
|
+
"jsx-no-useless-fragment": [jsx, "no-useless-fragment"],
|
|
50
|
+
"no-object-type-as-default-prop": [core, "no-unstable-default-props"],
|
|
51
|
+
"no-unstable-nested-components": [core, "no-nested-component-definitions"],
|
|
52
|
+
"display-name": [core, "no-missing-component-display-name"],
|
|
53
|
+
"forward-ref-uses-ref": [core, "no-forward-ref"],
|
|
54
|
+
"destructuring-assignment": [core, "prefer-destructuring-assignment"],
|
|
55
|
+
"no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
|
|
56
|
+
"no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
|
|
57
|
+
"no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
|
|
58
|
+
"hook-use-state": [core, "use-state"],
|
|
59
|
+
"no-danger": [dom, "no-dangerously-set-innerhtml"],
|
|
60
|
+
"no-danger-with-children": [dom, "no-dangerously-set-innerhtml-with-children"],
|
|
61
|
+
"no-find-dom-node": [dom, "no-find-dom-node"],
|
|
62
|
+
"no-namespace": [jsx, "no-namespace"],
|
|
63
|
+
"no-render-return-value": [dom, "no-render-return-value"],
|
|
64
|
+
"jsx-no-script-url": [dom, "no-script-url"],
|
|
65
|
+
"jsx-no-target-blank": [dom, "no-unsafe-target-blank"],
|
|
66
|
+
"no-unknown-property": [dom, "no-unknown-property"],
|
|
67
|
+
"void-dom-elements-no-children": [dom, "no-void-elements-with-children"],
|
|
68
|
+
"button-has-type": [dom, "no-missing-button-type"],
|
|
69
|
+
"iframe-missing-sandbox": [dom, "no-missing-iframe-sandbox"],
|
|
70
|
+
"style-prop-object": [dom, "no-string-style-prop"],
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Identical-name aliases (core rules where legacy name = @eslint-react name)
|
|
74
|
+
const identicalCore = [
|
|
75
|
+
"no-access-state-in-setstate", "no-array-index-key",
|
|
76
|
+
"no-direct-mutation-state", "no-redundant-should-component-update",
|
|
77
|
+
"no-unused-class-component-members", "no-unused-state",
|
|
78
|
+
]
|
|
79
|
+
for (const n of identicalCore) aliases[n] = [core, n]
|
|
80
|
+
aliases["no-children-prop"] = [jsx, "no-children-prop"]
|
|
81
|
+
aliases["jsx-no-comment-textnodes"] = [jsx, "no-comment-textnodes"]
|
|
82
|
+
|
|
83
|
+
// Build aliased originals set
|
|
84
|
+
const aliasedCore = new Set()
|
|
85
|
+
for (const [src, name] of Object.values(aliases)) {
|
|
86
|
+
if (src === core) aliasedCore.add(name)
|
|
87
|
+
else if (src === dom) aliasedCore.add("dom-" + name)
|
|
88
|
+
else if (src === jsx) aliasedCore.add("jsx-" + name)
|
|
89
|
+
else if (src === naming) aliasedCore.add("naming-convention-" + name)
|
|
90
|
+
else if (src === rsc) aliasedCore.add("rsc-" + name)
|
|
91
|
+
else if (src === webApi) aliasedCore.add("web-api-" + name)
|
|
92
|
+
}
|
|
93
|
+
const rules = {}
|
|
94
|
+
|
|
95
|
+
// Core rules (skip aliased originals)
|
|
96
|
+
for (const [n, r] of Object.entries(core)) { if (!aliasedCore.has(n)) rules[n] = r }
|
|
97
|
+
|
|
98
|
+
// Sub-plugin rules (skip aliased + prefer-namespace-import collision)
|
|
99
|
+
const subs = [[dom, new Set(['prefer-namespace-import'])], [jsx], [webApi], [naming], [rsc]]
|
|
100
|
+
for (const [src, skip] of subs) {
|
|
101
|
+
for (const [n, r] of Object.entries(src)) {
|
|
102
|
+
if (skip && skip.has(n)) continue
|
|
103
|
+
if (Object.values(aliases).some(([s, o]) => s === src && o === n)) continue
|
|
104
|
+
rules[n] = r
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Add legacy aliases
|
|
109
|
+
for (const [legacy, [src, orig]] of Object.entries(aliases)) rules[legacy] = src[orig]
|
|
110
|
+
|
|
111
|
+
return { meta: { name: "react-compat", version: "1.0.0" }, rules }
|
|
112
|
+
})()
|
|
113
|
+
|
|
29
114
|
export default [
|
|
30
115
|
// TypeScript parser setup
|
|
31
116
|
...tseslint.configs.strictTypeChecked.slice(0, 2),
|
|
32
117
|
|
|
33
|
-
// Base rules — all effective rules for
|
|
118
|
+
// Base rules — all effective rules for TS plus shared JS/TS rules
|
|
34
119
|
{
|
|
35
120
|
name: "eslint-config-setup/base",
|
|
121
|
+
ignores: ["**/*.{md,mdx}"],
|
|
36
122
|
plugins: {
|
|
37
123
|
"@cspell": cspellPlugin,
|
|
38
124
|
"@stylistic": stylisticPlugin,
|
|
@@ -42,10 +128,7 @@ export default [
|
|
|
42
128
|
"jsdoc": jsdocPlugin,
|
|
43
129
|
"node": nodePlugin,
|
|
44
130
|
"perfectionist": perfectionistPlugin,
|
|
45
|
-
"react":
|
|
46
|
-
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
47
|
-
"react-hooks": reactHooksPlugin,
|
|
48
|
-
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
131
|
+
"react": reactCompatPlugin,
|
|
49
132
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
50
133
|
"regexp": regexpPlugin,
|
|
51
134
|
"security": securityPlugin,
|
|
@@ -90,16 +173,31 @@ export default [
|
|
|
90
173
|
}
|
|
91
174
|
],
|
|
92
175
|
"@typescript-eslint/dot-notation": "error",
|
|
176
|
+
"@typescript-eslint/method-signature-style": [
|
|
177
|
+
"error",
|
|
178
|
+
"property"
|
|
179
|
+
],
|
|
93
180
|
"@typescript-eslint/no-array-delete": "error",
|
|
94
181
|
"@typescript-eslint/no-base-to-string": "error",
|
|
95
182
|
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
96
183
|
"@typescript-eslint/no-deprecated": "warn",
|
|
97
184
|
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
|
98
|
-
"@typescript-eslint/no-floating-promises":
|
|
185
|
+
"@typescript-eslint/no-floating-promises": [
|
|
186
|
+
"error",
|
|
187
|
+
{
|
|
188
|
+
"checkThenables": true,
|
|
189
|
+
"ignoreIIFE": true
|
|
190
|
+
}
|
|
191
|
+
],
|
|
99
192
|
"@typescript-eslint/no-for-in-array": "error",
|
|
100
193
|
"@typescript-eslint/no-implied-eval": "error",
|
|
101
194
|
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
102
|
-
"@typescript-eslint/no-misused-promises":
|
|
195
|
+
"@typescript-eslint/no-misused-promises": [
|
|
196
|
+
"error",
|
|
197
|
+
{
|
|
198
|
+
"checksVoidReturn": false
|
|
199
|
+
}
|
|
200
|
+
],
|
|
103
201
|
"@typescript-eslint/no-misused-spread": "error",
|
|
104
202
|
"@typescript-eslint/no-mixed-enums": "error",
|
|
105
203
|
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
@@ -117,6 +215,7 @@ export default [
|
|
|
117
215
|
"@typescript-eslint/no-unsafe-enum-comparison": "error",
|
|
118
216
|
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
119
217
|
"@typescript-eslint/no-unsafe-return": "error",
|
|
218
|
+
"@typescript-eslint/no-unsafe-type-assertion": "error",
|
|
120
219
|
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
|
121
220
|
"@typescript-eslint/no-useless-default-assignment": "error",
|
|
122
221
|
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
@@ -126,11 +225,19 @@ export default [
|
|
|
126
225
|
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
127
226
|
"@typescript-eslint/prefer-optional-chain": "error",
|
|
128
227
|
"@typescript-eslint/prefer-promise-reject-errors": "error",
|
|
228
|
+
"@typescript-eslint/prefer-readonly": "warn",
|
|
129
229
|
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
130
230
|
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
131
231
|
"@typescript-eslint/prefer-return-this-type": "error",
|
|
132
232
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
233
|
+
"@typescript-eslint/promise-function-async": "error",
|
|
133
234
|
"@typescript-eslint/related-getter-setter-pairs": "error",
|
|
235
|
+
"@typescript-eslint/require-array-sort-compare": [
|
|
236
|
+
"error",
|
|
237
|
+
{
|
|
238
|
+
"ignoreStringArrays": true
|
|
239
|
+
}
|
|
240
|
+
],
|
|
134
241
|
"@typescript-eslint/require-await": "error",
|
|
135
242
|
"@typescript-eslint/restrict-plus-operands": [
|
|
136
243
|
"error",
|
|
@@ -160,6 +267,13 @@ export default [
|
|
|
160
267
|
}
|
|
161
268
|
],
|
|
162
269
|
"@typescript-eslint/strict-void-return": "error",
|
|
270
|
+
"@typescript-eslint/switch-exhaustiveness-check": [
|
|
271
|
+
"error",
|
|
272
|
+
{
|
|
273
|
+
"allowDefaultCaseForExhaustiveSwitch": false,
|
|
274
|
+
"requireDefaultForNonUnion": true
|
|
275
|
+
}
|
|
276
|
+
],
|
|
163
277
|
"@typescript-eslint/unbound-method": "error",
|
|
164
278
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
|
|
165
279
|
"accessor-pairs": [
|
|
@@ -191,6 +305,12 @@ export default [
|
|
|
191
305
|
],
|
|
192
306
|
"guard-for-in": "error",
|
|
193
307
|
"import/newline-after-import": "error",
|
|
308
|
+
"import/no-extraneous-dependencies": [
|
|
309
|
+
"error",
|
|
310
|
+
{
|
|
311
|
+
"includeTypes": true
|
|
312
|
+
}
|
|
313
|
+
],
|
|
194
314
|
"import/no-useless-path-segments": "error",
|
|
195
315
|
"jsdoc/check-alignment": "error",
|
|
196
316
|
"jsdoc/check-param-names": "error",
|
|
@@ -249,6 +369,7 @@ export default [
|
|
|
249
369
|
"no-extend-native": "error",
|
|
250
370
|
"no-extra-bind": "error",
|
|
251
371
|
"no-fallthrough": "error",
|
|
372
|
+
"no-implicit-globals": "error",
|
|
252
373
|
"no-labels": "error",
|
|
253
374
|
"no-lone-blocks": "error",
|
|
254
375
|
"no-multi-str": "error",
|
|
@@ -262,18 +383,33 @@ export default [
|
|
|
262
383
|
"no-proto": "error",
|
|
263
384
|
"no-prototype-builtins": "error",
|
|
264
385
|
"no-regex-spaces": "error",
|
|
386
|
+
"no-return-assign": [
|
|
387
|
+
"error",
|
|
388
|
+
"always"
|
|
389
|
+
],
|
|
265
390
|
"no-script-url": "error",
|
|
266
391
|
"no-self-compare": "error",
|
|
267
|
-
"no-sequences":
|
|
392
|
+
"no-sequences": [
|
|
393
|
+
"error",
|
|
394
|
+
{
|
|
395
|
+
"allowInParentheses": false
|
|
396
|
+
}
|
|
397
|
+
],
|
|
268
398
|
"no-template-curly-in-string": "error",
|
|
269
399
|
"no-unmodified-loop-condition": "error",
|
|
270
400
|
"no-unreachable-loop": "error",
|
|
271
401
|
"no-useless-assignment": "error",
|
|
272
402
|
"no-useless-call": "error",
|
|
273
|
-
"no-useless-computed-key":
|
|
403
|
+
"no-useless-computed-key": [
|
|
404
|
+
"error",
|
|
405
|
+
{
|
|
406
|
+
"enforceForClassMembers": true
|
|
407
|
+
}
|
|
408
|
+
],
|
|
274
409
|
"no-useless-concat": "error",
|
|
275
410
|
"no-useless-return": "error",
|
|
276
411
|
"no-var": "error",
|
|
412
|
+
"node/handle-callback-err": "error",
|
|
277
413
|
"node/hashbang": "error",
|
|
278
414
|
"node/no-deprecated-api": "error",
|
|
279
415
|
"node/no-exports-assign": "error",
|
|
@@ -301,6 +437,15 @@ export default [
|
|
|
301
437
|
],
|
|
302
438
|
"node/prefer-promises/dns": "error",
|
|
303
439
|
"node/prefer-promises/fs": "error",
|
|
440
|
+
"node/process-exit-as-throw": "error",
|
|
441
|
+
"object-shorthand": [
|
|
442
|
+
"error",
|
|
443
|
+
"always",
|
|
444
|
+
{
|
|
445
|
+
"avoidExplicitReturnArrows": true,
|
|
446
|
+
"avoidQuotes": true
|
|
447
|
+
}
|
|
448
|
+
],
|
|
304
449
|
"perfectionist/sort-exports": "error",
|
|
305
450
|
"perfectionist/sort-imports": [
|
|
306
451
|
"error",
|
|
@@ -313,27 +458,15 @@ export default [
|
|
|
313
458
|
"perfectionist/sort-named-imports": "error",
|
|
314
459
|
"perfectionist/sort-union-types": "error",
|
|
315
460
|
"prefer-const": "error",
|
|
461
|
+
"prefer-numeric-literals": "error",
|
|
316
462
|
"prefer-object-has-own": "error",
|
|
317
463
|
"prefer-object-spread": "error",
|
|
318
464
|
"prefer-regex-literals": "error",
|
|
319
465
|
"prefer-rest-params": "error",
|
|
320
466
|
"prefer-spread": "error",
|
|
321
|
-
"prefer-template": "
|
|
467
|
+
"prefer-template": "warn",
|
|
322
468
|
"preserve-caught-error": "error",
|
|
323
469
|
"radix": "error",
|
|
324
|
-
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
325
|
-
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
326
|
-
"react-dom/no-missing-button-type": "error",
|
|
327
|
-
"react-dom/no-missing-iframe-sandbox": "error",
|
|
328
|
-
"react-dom/no-string-style-prop": "error",
|
|
329
|
-
"react-dom/no-unknown-property": "error",
|
|
330
|
-
"react-dom/no-unsafe-target-blank": "error",
|
|
331
|
-
"react-dom/no-void-elements-with-children": "error",
|
|
332
|
-
"react-hooks/rules-of-hooks": "error",
|
|
333
|
-
"react-web-api/no-leaked-event-listener": "error",
|
|
334
|
-
"react-web-api/no-leaked-interval": "error",
|
|
335
|
-
"react-web-api/no-leaked-resize-observer": "error",
|
|
336
|
-
"react-web-api/no-leaked-timeout": "error",
|
|
337
470
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
338
471
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
339
472
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
@@ -343,19 +476,62 @@ export default [
|
|
|
343
476
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
344
477
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
345
478
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
346
|
-
"react/
|
|
479
|
+
"react/component-hook-factories": "error",
|
|
480
|
+
"react/context-name": "warn",
|
|
481
|
+
"react/destructuring-assignment": "warn",
|
|
482
|
+
"react/error-boundaries": "error",
|
|
483
|
+
"react/exhaustive-deps": "warn",
|
|
484
|
+
"react/function-definition": "error",
|
|
485
|
+
"react/id-name": "warn",
|
|
486
|
+
"react/jsx-key-before-spread": "error",
|
|
487
|
+
"react/jsx-no-children-prop-with-children": "error",
|
|
488
|
+
"react/jsx-no-leaked-render": "error",
|
|
489
|
+
"react/jsx-no-leaked-semicolon": "warn",
|
|
347
490
|
"react/no-access-state-in-setstate": "error",
|
|
348
|
-
"react/no-
|
|
491
|
+
"react/no-children-count": "warn",
|
|
492
|
+
"react/no-children-for-each": "warn",
|
|
493
|
+
"react/no-children-map": "warn",
|
|
494
|
+
"react/no-children-only": "warn",
|
|
495
|
+
"react/no-children-to-array": "warn",
|
|
496
|
+
"react/no-class-component": "error",
|
|
497
|
+
"react/no-component-will-mount": "error",
|
|
498
|
+
"react/no-component-will-receive-props": "error",
|
|
499
|
+
"react/no-component-will-update": "error",
|
|
500
|
+
"react/no-context-provider": "warn",
|
|
501
|
+
"react/no-create-ref": "error",
|
|
502
|
+
"react/no-did-update-set-state": "warn",
|
|
349
503
|
"react/no-duplicate-key": "error",
|
|
350
|
-
"react/no-
|
|
351
|
-
"react/no-
|
|
352
|
-
"react/no-
|
|
353
|
-
"react/no-
|
|
354
|
-
"react/no-
|
|
355
|
-
"react/no-
|
|
356
|
-
"react/no-
|
|
357
|
-
"react/no-
|
|
358
|
-
"react/no-
|
|
504
|
+
"react/no-flush-sync": "error",
|
|
505
|
+
"react/no-hydrate": "error",
|
|
506
|
+
"react/no-implicit-key": "error",
|
|
507
|
+
"react/no-leaked-event-listener": "warn",
|
|
508
|
+
"react/no-leaked-interval": "warn",
|
|
509
|
+
"react/no-leaked-resize-observer": "warn",
|
|
510
|
+
"react/no-leaked-timeout": "warn",
|
|
511
|
+
"react/no-misused-capture-owner-stack": "error",
|
|
512
|
+
"react/no-nested-lazy-component-declarations": "error",
|
|
513
|
+
"react/no-object-type-as-default-prop": "warn",
|
|
514
|
+
"react/no-render": "error",
|
|
515
|
+
"react/no-unnecessary-use-callback": "warn",
|
|
516
|
+
"react/no-unnecessary-use-memo": "warn",
|
|
517
|
+
"react/no-unnecessary-use-prefix": "warn",
|
|
518
|
+
"react/no-unsafe-component-will-mount": "warn",
|
|
519
|
+
"react/no-unsafe-component-will-receive-props": "warn",
|
|
520
|
+
"react/no-unsafe-component-will-update": "warn",
|
|
521
|
+
"react/no-unsafe-iframe-sandbox": "warn",
|
|
522
|
+
"react/no-unstable-nested-components": "error",
|
|
523
|
+
"react/no-unused-class-component-members": "warn",
|
|
524
|
+
"react/no-unused-props": "warn",
|
|
525
|
+
"react/no-unused-state": "warn",
|
|
526
|
+
"react/no-use-context": "warn",
|
|
527
|
+
"react/no-use-form-state": "error",
|
|
528
|
+
"react/purity": "warn",
|
|
529
|
+
"react/ref-name": "warn",
|
|
530
|
+
"react/rules-of-hooks": "error",
|
|
531
|
+
"react/set-state-in-effect": "warn",
|
|
532
|
+
"react/set-state-in-render": "error",
|
|
533
|
+
"react/unsupported-syntax": "error",
|
|
534
|
+
"react/use-memo": "error",
|
|
359
535
|
"regexp/confusing-quantifier": "warn",
|
|
360
536
|
"regexp/control-character-escape": "error",
|
|
361
537
|
"regexp/match-any": "error",
|
|
@@ -460,13 +636,13 @@ export default [
|
|
|
460
636
|
"sonarjs/prefer-single-boolean-return": "error",
|
|
461
637
|
"sonarjs/reduce-initial-value": "error",
|
|
462
638
|
"symbol-description": "error",
|
|
639
|
+
"unicorn/no-for-loop": "warn",
|
|
463
640
|
"unicorn/prefer-export-from": [
|
|
464
641
|
"error",
|
|
465
642
|
{
|
|
466
643
|
"ignoreUsedVariables": true
|
|
467
644
|
}
|
|
468
645
|
],
|
|
469
|
-
"unicorn/prefer-import-meta-properties": "error",
|
|
470
646
|
"unused-imports/no-unused-imports": "error",
|
|
471
647
|
"yoda": "error"
|
|
472
648
|
},
|
|
@@ -481,6 +657,7 @@ export default [
|
|
|
481
657
|
"@typescript-eslint/consistent-return": "off",
|
|
482
658
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
483
659
|
"@typescript-eslint/dot-notation": "off",
|
|
660
|
+
"@typescript-eslint/method-signature-style": "off",
|
|
484
661
|
"@typescript-eslint/naming-convention": "off",
|
|
485
662
|
"@typescript-eslint/no-array-delete": "off",
|
|
486
663
|
"@typescript-eslint/no-base-to-string": "off",
|
|
@@ -538,18 +715,28 @@ export default [
|
|
|
538
715
|
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
539
716
|
"@typescript-eslint/unbound-method": "off",
|
|
540
717
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
718
|
+
"dot-notation": "off",
|
|
541
719
|
"getter-return": "error",
|
|
720
|
+
"no-array-constructor": "off",
|
|
542
721
|
"no-dupe-args": "error",
|
|
722
|
+
"no-empty-function": "off",
|
|
723
|
+
"no-implied-eval": "off",
|
|
543
724
|
"no-new-symbol": "off",
|
|
544
725
|
"no-redeclare": "error",
|
|
726
|
+
"no-return-await": "off",
|
|
727
|
+
"no-shadow": "off",
|
|
728
|
+
"no-throw-literal": "off",
|
|
545
729
|
"no-undef": "error",
|
|
546
730
|
"no-unreachable": "error",
|
|
731
|
+
"no-useless-constructor": "off",
|
|
547
732
|
"prefer-const": [
|
|
548
733
|
"error",
|
|
549
734
|
{
|
|
550
735
|
"destructuring": "all"
|
|
551
736
|
}
|
|
552
|
-
]
|
|
737
|
+
],
|
|
738
|
+
"prefer-promise-reject-errors": "off",
|
|
739
|
+
"require-await": "off"
|
|
553
740
|
},
|
|
554
741
|
},
|
|
555
742
|
|
|
@@ -591,8 +778,7 @@ export default [
|
|
|
591
778
|
"vitest/prefer-spy-on": "error",
|
|
592
779
|
"vitest/prefer-strict-equal": "error",
|
|
593
780
|
"vitest/prefer-to-be": "error",
|
|
594
|
-
"vitest/prefer-to-have-length": "error"
|
|
595
|
-
"vitest/valid-title": "error"
|
|
781
|
+
"vitest/prefer-to-have-length": "error"
|
|
596
782
|
},
|
|
597
783
|
},
|
|
598
784
|
|
|
@@ -763,7 +949,85 @@ export default [
|
|
|
763
949
|
// Markdown/MDX code block linting
|
|
764
950
|
{
|
|
765
951
|
...mdxPlugin.flatCodeBlocks,
|
|
952
|
+
languageOptions: {
|
|
953
|
+
...mdxPlugin.flatCodeBlocks.languageOptions,
|
|
954
|
+
parserOptions: {
|
|
955
|
+
...mdxPlugin.flatCodeBlocks.languageOptions?.parserOptions,
|
|
956
|
+
projectService: false,
|
|
957
|
+
},
|
|
958
|
+
},
|
|
766
959
|
rules: {
|
|
960
|
+
...{
|
|
961
|
+
"@typescript-eslint/await-thenable": "off",
|
|
962
|
+
"@typescript-eslint/consistent-type-exports": "off",
|
|
963
|
+
"@typescript-eslint/dot-notation": "off",
|
|
964
|
+
"@typescript-eslint/method-signature-style": "off",
|
|
965
|
+
"@typescript-eslint/no-array-delete": "off",
|
|
966
|
+
"@typescript-eslint/no-base-to-string": "off",
|
|
967
|
+
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
968
|
+
"@typescript-eslint/no-deprecated": "off",
|
|
969
|
+
"@typescript-eslint/no-duplicate-type-constituents": "off",
|
|
970
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
971
|
+
"@typescript-eslint/no-for-in-array": "off",
|
|
972
|
+
"@typescript-eslint/no-implied-eval": "off",
|
|
973
|
+
"@typescript-eslint/no-meaningless-void-operator": "off",
|
|
974
|
+
"@typescript-eslint/no-misused-spread": "off",
|
|
975
|
+
"@typescript-eslint/no-mixed-enums": "off",
|
|
976
|
+
"@typescript-eslint/no-redundant-type-constituents": "off",
|
|
977
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
|
|
978
|
+
"@typescript-eslint/no-unnecessary-condition": "off",
|
|
979
|
+
"@typescript-eslint/no-unnecessary-qualifier": "off",
|
|
980
|
+
"@typescript-eslint/no-unnecessary-template-expression": "off",
|
|
981
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
982
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
983
|
+
"@typescript-eslint/no-unnecessary-type-conversion": "off",
|
|
984
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
|
985
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
986
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
987
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
988
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
989
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
990
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
991
|
+
"@typescript-eslint/no-unsafe-type-assertion": "off",
|
|
992
|
+
"@typescript-eslint/no-unsafe-unary-minus": "off",
|
|
993
|
+
"@typescript-eslint/no-useless-default-assignment": "off",
|
|
994
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
995
|
+
"@typescript-eslint/only-throw-error": "off",
|
|
996
|
+
"@typescript-eslint/prefer-find": "off",
|
|
997
|
+
"@typescript-eslint/prefer-includes": "off",
|
|
998
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
999
|
+
"@typescript-eslint/prefer-optional-chain": "off",
|
|
1000
|
+
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
1001
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
1002
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
|
1003
|
+
"@typescript-eslint/prefer-regexp-exec": "off",
|
|
1004
|
+
"@typescript-eslint/prefer-return-this-type": "off",
|
|
1005
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "off",
|
|
1006
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
1007
|
+
"@typescript-eslint/related-getter-setter-pairs": "off",
|
|
1008
|
+
"@typescript-eslint/require-array-sort-compare": "off",
|
|
1009
|
+
"@typescript-eslint/require-await": "off",
|
|
1010
|
+
"@typescript-eslint/restrict-plus-operands": "off",
|
|
1011
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
1012
|
+
"@typescript-eslint/return-await": "off",
|
|
1013
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
1014
|
+
"@typescript-eslint/strict-void-return": "off",
|
|
1015
|
+
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
1016
|
+
"@typescript-eslint/unbound-method": "off",
|
|
1017
|
+
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
1018
|
+
"dot-notation": "off",
|
|
1019
|
+
"no-array-constructor": "off",
|
|
1020
|
+
"no-empty-function": "off",
|
|
1021
|
+
"no-implied-eval": "off",
|
|
1022
|
+
"no-return-await": "off",
|
|
1023
|
+
"no-shadow": "off",
|
|
1024
|
+
"no-throw-literal": "off",
|
|
1025
|
+
"no-useless-constructor": "off",
|
|
1026
|
+
"prefer-promise-reject-errors": "off",
|
|
1027
|
+
"require-await": "off",
|
|
1028
|
+
"strict": "off",
|
|
1029
|
+
"unicode-bom": "off"
|
|
1030
|
+
},
|
|
767
1031
|
...mdxPlugin.flatCodeBlocks.rules,
|
|
768
1032
|
"eol-last": "off",
|
|
769
1033
|
"no-undef": "off",
|