@nekoyasuii/config 0.1.2 → 0.1.4
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/{chunk-8m4by0h8.js → chunk-0xdbbpn5.js} +47 -23
- package/dist/chunk-97s6xvc6.js +32 -0
- package/dist/{chunk-1chg07xf.js → chunk-fqcw0kzp.js} +17 -1
- package/dist/tools/oxlint/config/anti-slop/index.d.ts +15 -0
- package/dist/tools/oxlint/config/core/index.d.ts +19 -0
- package/dist/tools/oxlint/config/index.d.ts +70 -24
- package/dist/tools/oxlint/config/index.js +12 -3
- package/dist/tools/oxlint/config/js-plugins/index.d.ts +180 -5
- package/dist/tools/oxlint/config/js-plugins/index.js +1 -1
- package/dist/tools/oxlint/config/no-comment-slop/index.d.ts +19 -0
- package/dist/tools/oxlint/config/no-comment-slop/index.js +7 -0
- package/dist/tools/oxlint/config/no-comment-slop/plugin.d.ts +658 -0
- package/dist/tools/oxlint/config/no-comment-slop/plugin.js +918 -0
- package/dist/tools/oxlint/config/react/index.d.ts +80 -21
- package/dist/tools/oxlint/config/react/index.js +1 -1
- package/dist/tools/oxlint/config/tanstack/index.d.ts +10 -0
- package/dist/tools/oxlint/config/tanstack/js-plugins/index.d.ts +18 -0
- package/dist/tools/oxlint/rules/index.js +261 -1
- package/dist/tools/shared/tsconfig-aliases.d.ts +3 -2
- package/package.json +1 -1
|
@@ -43,21 +43,16 @@ var reactConfig = defineConfig({
|
|
|
43
43
|
"react-perf/jsx-no-new-array-as-prop": "off",
|
|
44
44
|
"react-perf/jsx-no-new-function-as-prop": "off",
|
|
45
45
|
"react-perf/jsx-no-new-object-as-prop": "off",
|
|
46
|
-
"react/button-has-type": "error",
|
|
47
46
|
"react/capitalized-calls": "error",
|
|
48
|
-
"react/checked-requires-onchange-or-readonly": "error",
|
|
49
|
-
"react/display-name": "error",
|
|
50
47
|
"react/error-boundaries": "error",
|
|
51
48
|
"react/exhaustive-deps": "error",
|
|
52
49
|
"react/exhaustive-effect-dependencies": "error",
|
|
53
|
-
"react/forbid-component-props": "off",
|
|
54
|
-
"react/forbid-dom-props": "error",
|
|
55
|
-
"react/forbid-elements": "error",
|
|
56
50
|
"react/forward-ref-uses-ref": "off",
|
|
57
51
|
"react/function-component-definition": [
|
|
58
52
|
"error",
|
|
59
53
|
{
|
|
60
|
-
namedComponents: "arrow-function"
|
|
54
|
+
namedComponents: "arrow-function",
|
|
55
|
+
unnamedComponents: "arrow-function"
|
|
61
56
|
}
|
|
62
57
|
],
|
|
63
58
|
"react/globals": "error",
|
|
@@ -67,50 +62,35 @@ var reactConfig = defineConfig({
|
|
|
67
62
|
"react/immutability": "error",
|
|
68
63
|
"react/incompatible-library": "error",
|
|
69
64
|
"react/invariant": "error",
|
|
70
|
-
"react/jsx-boolean-value": "off",
|
|
71
65
|
"react/jsx-curly-brace-presence": "error",
|
|
72
|
-
"react/jsx-filename-extension": "off",
|
|
73
66
|
"react/jsx-fragments": "error",
|
|
74
67
|
"react/jsx-key": "error",
|
|
75
|
-
"react/jsx-max-depth": "off",
|
|
76
68
|
"react/jsx-no-comment-textnodes": "error",
|
|
77
69
|
"react/jsx-no-constructed-context-values": "error",
|
|
78
70
|
"react/jsx-no-duplicate-props": "error",
|
|
79
|
-
"react/jsx-no-literals": "off",
|
|
80
|
-
"react/jsx-no-script-url": "error",
|
|
81
71
|
"react/jsx-no-target-blank": "error",
|
|
82
72
|
"react/jsx-no-undef": "error",
|
|
83
73
|
"react/jsx-no-useless-fragment": "error",
|
|
84
|
-
"react/jsx-pascal-case": "error",
|
|
85
74
|
"react/jsx-props-no-spread-multi": "error",
|
|
86
|
-
"react/jsx-props-no-spreading": "off",
|
|
87
75
|
"react/memo-dependencies": "error",
|
|
88
|
-
"react/no-array-index-key": "off",
|
|
89
76
|
"react/no-children-prop": "error",
|
|
90
77
|
"react/no-clone-element": "error",
|
|
91
|
-
"react/no-danger": "error",
|
|
92
78
|
"react/no-danger-with-children": "error",
|
|
93
79
|
"react/no-deriving-state-in-effects": "error",
|
|
94
|
-
"react/no-did-mount-set-state": "error",
|
|
95
80
|
"react/no-did-update-set-state": "error",
|
|
96
81
|
"react/no-direct-mutation-state": "error",
|
|
97
82
|
"react/no-find-dom-node": "error",
|
|
98
83
|
"react/no-is-mounted": "error",
|
|
99
|
-
"react/no-multi-comp": "off",
|
|
100
84
|
"react/no-namespace": "error",
|
|
101
|
-
"react/no-object-type-as-default-prop": "error",
|
|
102
85
|
"react/no-react-children": "error",
|
|
103
|
-
"react/no-redundant-should-component-update": "error",
|
|
104
86
|
"react/no-render-return-value": "error",
|
|
105
87
|
"react/no-set-state": "error",
|
|
106
88
|
"react/no-string-refs": "error",
|
|
107
89
|
"react/no-this-in-sfc": "error",
|
|
108
90
|
"react/no-unescaped-entities": "error",
|
|
109
91
|
"react/no-unknown-property": "off",
|
|
110
|
-
"react/no-unsafe": "error",
|
|
111
92
|
"react/no-unstable-nested-components": "error",
|
|
112
93
|
"react/no-will-update-set-state": "error",
|
|
113
|
-
"react/only-export-components": "off",
|
|
114
94
|
"react/prefer-es6-class": "error",
|
|
115
95
|
"react/prefer-function-component": "error",
|
|
116
96
|
"react/preserve-manual-memoization": "error",
|
|
@@ -131,7 +111,51 @@ var reactConfig = defineConfig({
|
|
|
131
111
|
"react/use-memo": "error",
|
|
132
112
|
"react/void-dom-elements-no-children": "error",
|
|
133
113
|
"react/void-use-memo": "error",
|
|
134
|
-
"react/jsx-handler-names": "off"
|
|
114
|
+
"react/jsx-handler-names": "off",
|
|
115
|
+
"react/only-export-components": ["warn", { allowConstantExport: true }],
|
|
116
|
+
"react/button-has-type": ["off"],
|
|
117
|
+
"react/checked-requires-onchange-or-readonly": ["off"],
|
|
118
|
+
"react/display-name": ["off"],
|
|
119
|
+
"react/forbid-component-props": ["off"],
|
|
120
|
+
"react/forbid-dom-props": ["off"],
|
|
121
|
+
"react/forbid-elements": ["off"],
|
|
122
|
+
"react/jsx-boolean-value": ["error", "never"],
|
|
123
|
+
"react/jsx-filename-extension": [
|
|
124
|
+
"error",
|
|
125
|
+
{
|
|
126
|
+
extensions: [".jsx", ".tsx"]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"react/jsx-max-depth": ["off"],
|
|
130
|
+
"react/jsx-no-literals": ["off"],
|
|
131
|
+
"react/jsx-no-script-url": [
|
|
132
|
+
"error",
|
|
133
|
+
[
|
|
134
|
+
{
|
|
135
|
+
name: "Link",
|
|
136
|
+
props: ["to"]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
],
|
|
140
|
+
"react/jsx-pascal-case": [
|
|
141
|
+
"error",
|
|
142
|
+
{
|
|
143
|
+
allowAllCaps: true
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"react/jsx-props-no-spreading": [
|
|
147
|
+
2,
|
|
148
|
+
{
|
|
149
|
+
explicitSpread: "ignore"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"react/no-array-index-key": ["off"],
|
|
153
|
+
"react/no-danger": ["warn"],
|
|
154
|
+
"react/no-did-mount-set-state": ["off"],
|
|
155
|
+
"react/no-multi-comp": ["off"],
|
|
156
|
+
"react/no-object-type-as-default-prop": ["off"],
|
|
157
|
+
"react/no-redundant-should-component-update": ["off"],
|
|
158
|
+
"react/no-unsafe": ["off"]
|
|
135
159
|
}
|
|
136
160
|
});
|
|
137
161
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// tools/oxlint/config/no-comment-slop/index.ts
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { defineConfig } from "oxlint";
|
|
5
|
+
var pluginCandidates = [
|
|
6
|
+
new URL("plugin.js", import.meta.url),
|
|
7
|
+
new URL("tools/oxlint/config/no-comment-slop/plugin.js", import.meta.url)
|
|
8
|
+
];
|
|
9
|
+
var noCommentSlopPluginPath = fileURLToPath(pluginCandidates.find((candidate) => existsSync(candidate)) ?? pluginCandidates[0]);
|
|
10
|
+
var noCommentSlopConfig = defineConfig({
|
|
11
|
+
jsPlugins: [
|
|
12
|
+
{
|
|
13
|
+
name: "no-comment-slop",
|
|
14
|
+
specifier: noCommentSlopPluginPath
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
rules: {
|
|
18
|
+
"no-comment-slop/max-comment-lines": "error",
|
|
19
|
+
"no-comment-slop/no-banner-comment": "error",
|
|
20
|
+
"no-comment-slop/no-trailing-comment": "error",
|
|
21
|
+
"no-comment-slop/prefer-jsdoc-for-exports": "error",
|
|
22
|
+
"no-comment-slop/prefer-jsdoc-for-members": "error",
|
|
23
|
+
"no-comment-slop/require-member-docs": "error",
|
|
24
|
+
"no-comment-slop/multiline-jsdoc-format": "error",
|
|
25
|
+
"no-comment-slop/no-trailing-period": "error",
|
|
26
|
+
"no-comment-slop/no-em-dash": "error",
|
|
27
|
+
"no-comment-slop/no-jargon": "error",
|
|
28
|
+
"no-comment-slop/no-foreign-syntax": "error"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export { noCommentSlopConfig };
|
|
@@ -37,6 +37,19 @@ var config = defineConfig({
|
|
|
37
37
|
rules: {
|
|
38
38
|
"sonarjs/no-duplicate-string": "off"
|
|
39
39
|
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
files: ["**/*.{ts,tsx}"],
|
|
43
|
+
rules: {
|
|
44
|
+
"lazuee/no-ts-accessibility": "error",
|
|
45
|
+
"lazuee/interface-pascal-case": "error"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
files: ["**/*.{ts,tsx,js,jsx}"],
|
|
50
|
+
rules: {
|
|
51
|
+
"lazuee/canonical-header-names": "off"
|
|
52
|
+
}
|
|
40
53
|
}
|
|
41
54
|
],
|
|
42
55
|
rules: {
|
|
@@ -412,7 +425,10 @@ var config = defineConfig({
|
|
|
412
425
|
"tailwindcss/consistent-variant-order": "warn",
|
|
413
426
|
"tailwindcss/enforce-consistent-important-position": "warn",
|
|
414
427
|
"tailwindcss/no-unnecessary-whitespace": "warn",
|
|
415
|
-
"lazuee/prefer-alias": "error"
|
|
428
|
+
"lazuee/prefer-alias": "error",
|
|
429
|
+
"lazuee/no-ts-accessibility": "off",
|
|
430
|
+
"lazuee/interface-pascal-case": "off",
|
|
431
|
+
"lazuee/canonical-header-names": "off"
|
|
416
432
|
}
|
|
417
433
|
});
|
|
418
434
|
var js_plugins_default = config;
|
|
@@ -11,6 +11,12 @@ export declare const antiSlopConfig: {
|
|
|
11
11
|
"anti-slop/no-object-parameters": "error";
|
|
12
12
|
"anti-slop/no-reflect-apply": "error";
|
|
13
13
|
"anti-slop/no-reflect-get": "error";
|
|
14
|
+
/**
|
|
15
|
+
* allowInTypeGuards exempts `typeof` inside type predicate functions
|
|
16
|
+
* ((x): x is T): predicates are the named-boundary pattern the rule
|
|
17
|
+
* pushes toward, and hand-rolled JSON/boundary validation has no other
|
|
18
|
+
* way to write the check (dmmulroy/anti-slop#10)
|
|
19
|
+
*/
|
|
14
20
|
"anti-slop/no-runtime-typeof": ["error", {
|
|
15
21
|
allowInTypeGuards: boolean;
|
|
16
22
|
}];
|
|
@@ -21,6 +27,15 @@ export declare const antiSlopConfig: {
|
|
|
21
27
|
"anti-slop/no-unsafe-dictionary-type": "error";
|
|
22
28
|
"anti-slop/no-widen-then-assert": "error";
|
|
23
29
|
"anti-slop/require-safety-comment-for-type-assertion": "error";
|
|
30
|
+
/**
|
|
31
|
+
* Core rules that pinch against anti-slop when both are enabled:
|
|
32
|
+
* consistent-indexed-object-style's autofix rewrites index-signature
|
|
33
|
+
* interfaces into `Record` aliases, which no-known-value-widening
|
|
34
|
+
* resolves and re-flags (a fix/break loop)
|
|
35
|
+
*
|
|
36
|
+
* no-immediate-mutation bans the empty-accumulator escape from the same
|
|
37
|
+
* rule. Extending this preset after core turns them off by default
|
|
38
|
+
*/
|
|
24
39
|
"typescript/consistent-indexed-object-style": "off";
|
|
25
40
|
"unicorn/no-immediate-mutation": "off";
|
|
26
41
|
};
|
|
@@ -4,6 +4,10 @@ export declare const coreConfig: {
|
|
|
4
4
|
};
|
|
5
5
|
ignorePatterns: string[];
|
|
6
6
|
overrides: {
|
|
7
|
+
/**
|
|
8
|
+
* Shared test file overrides: framework-specific test rules
|
|
9
|
+
* are in separate jest/ and vitest/ configs to avoid conflicts
|
|
10
|
+
*/
|
|
7
11
|
files: string[];
|
|
8
12
|
rules: {
|
|
9
13
|
"no-empty-function": "off";
|
|
@@ -12,6 +16,7 @@ export declare const coreConfig: {
|
|
|
12
16
|
}[];
|
|
13
17
|
plugins: ("eslint" | "import" | "jsdoc" | "node" | "oxc" | "promise" | "typescript" | "unicorn")[];
|
|
14
18
|
rules: {
|
|
19
|
+
/** ── eslint ────────────────────────────────────────────────────────── */
|
|
15
20
|
"accessor-pairs": "error";
|
|
16
21
|
"array-callback-return": "error";
|
|
17
22
|
"arrow-body-style": ["error", "as-needed"];
|
|
@@ -165,6 +170,7 @@ export declare const coreConfig: {
|
|
|
165
170
|
"no-useless-rename": "error";
|
|
166
171
|
"no-useless-return": "error";
|
|
167
172
|
"no-var": "error";
|
|
173
|
+
/** Avoid conflict with typescript/no-floating-promises */
|
|
168
174
|
"no-void": ["error", {
|
|
169
175
|
allowAsStatement: true;
|
|
170
176
|
}];
|
|
@@ -191,6 +197,7 @@ export declare const coreConfig: {
|
|
|
191
197
|
"require-await": "error";
|
|
192
198
|
"require-unicode-regexp": "error";
|
|
193
199
|
"require-yield": "error";
|
|
200
|
+
/** Rely on oxfmt `experimentalSortImports` instead */
|
|
194
201
|
"sort-imports": "off";
|
|
195
202
|
"sort-keys": "off";
|
|
196
203
|
"sort-vars": "error";
|
|
@@ -200,6 +207,7 @@ export declare const coreConfig: {
|
|
|
200
207
|
"valid-typeof": "error";
|
|
201
208
|
"vars-on-top": "error";
|
|
202
209
|
yoda: "error";
|
|
210
|
+
/** ── import ───────────────────────────────────────────────────────── */
|
|
203
211
|
"import/consistent-type-specifier-style": ["error", "prefer-top-level"];
|
|
204
212
|
"import/default": "error";
|
|
205
213
|
"import/exports-last": "off";
|
|
@@ -231,6 +239,7 @@ export declare const coreConfig: {
|
|
|
231
239
|
"import/no-webpack-loader-syntax": "error";
|
|
232
240
|
"import/prefer-default-export": "off";
|
|
233
241
|
"import/unambiguous": "off";
|
|
242
|
+
/** ── jsdoc ────────────────────────────────────────────────────────── */
|
|
234
243
|
"jsdoc/check-access": "error";
|
|
235
244
|
"jsdoc/check-property-names": "error";
|
|
236
245
|
"jsdoc/check-tag-names": "error";
|
|
@@ -254,6 +263,7 @@ export declare const coreConfig: {
|
|
|
254
263
|
"jsdoc/require-yields": "error";
|
|
255
264
|
"jsdoc/require-yields-description": "error";
|
|
256
265
|
"jsdoc/require-yields-type": "error";
|
|
266
|
+
/** ── node ─────────────────────────────────────────────────────────── */
|
|
257
267
|
"node/callback-return": "error";
|
|
258
268
|
"node/exports-style": "error";
|
|
259
269
|
"node/global-require": "error";
|
|
@@ -264,7 +274,12 @@ export declare const coreConfig: {
|
|
|
264
274
|
"node/no-path-concat": "error";
|
|
265
275
|
"node/no-process-env": "off";
|
|
266
276
|
"node/no-sync": "off";
|
|
277
|
+
/**
|
|
278
|
+
* Top-level await is idiomatic in ESM: Astro frontmatter, build
|
|
279
|
+
* scripts, and CLI entry points all rely on it
|
|
280
|
+
*/
|
|
267
281
|
"node/no-top-level-await": "off";
|
|
282
|
+
/** ── oxc ──────────────────────────────────────────────────────────── */
|
|
268
283
|
"oxc/approx-constant": "error";
|
|
269
284
|
"oxc/bad-array-method-on-arguments": "error";
|
|
270
285
|
"oxc/bad-bitwise-operator": "error";
|
|
@@ -292,6 +307,7 @@ export declare const coreConfig: {
|
|
|
292
307
|
"oxc/number-arg-out-of-range": "error";
|
|
293
308
|
"oxc/only-used-in-recursion": "error";
|
|
294
309
|
"oxc/uninvoked-array-callback": "error";
|
|
310
|
+
/** ── promise ──────────────────────────────────────────────────────── */
|
|
295
311
|
"promise/always-return": "off";
|
|
296
312
|
"promise/avoid-new": "error";
|
|
297
313
|
"promise/catch-or-return": "off";
|
|
@@ -307,6 +323,7 @@ export declare const coreConfig: {
|
|
|
307
323
|
"promise/prefer-catch": "error";
|
|
308
324
|
"promise/spec-only": "error";
|
|
309
325
|
"promise/valid-params": "error";
|
|
326
|
+
/** ── typescript ───────────────────────────────────────────────────── */
|
|
310
327
|
"typescript/adjacent-overload-signatures": "error";
|
|
311
328
|
"typescript/array-type": "error";
|
|
312
329
|
"typescript/await-thenable": "error";
|
|
@@ -415,6 +432,7 @@ export declare const coreConfig: {
|
|
|
415
432
|
"typescript/unbound-method": "error";
|
|
416
433
|
"typescript/unified-signatures": "error";
|
|
417
434
|
"typescript/use-unknown-in-catch-callback-variable": "error";
|
|
435
|
+
/** ── unicorn ──────────────────────────────────────────────────────── */
|
|
418
436
|
"unicorn/consistent-template-literal-escape": "error";
|
|
419
437
|
"unicorn/catch-error-name": "error";
|
|
420
438
|
"unicorn/consistent-assert": "error";
|
|
@@ -485,6 +503,7 @@ export declare const coreConfig: {
|
|
|
485
503
|
"unicorn/no-useless-switch-case": "error";
|
|
486
504
|
"unicorn/no-useless-undefined": "error";
|
|
487
505
|
"unicorn/no-zero-fractions": "error";
|
|
506
|
+
/** Disabled due to https://github.com/oxc-project/oxc/issues/21949 */
|
|
488
507
|
"unicorn/number-literal-case": "off";
|
|
489
508
|
"unicorn/numeric-separators-style": "error";
|
|
490
509
|
"unicorn/prefer-add-event-listener": "error";
|
|
@@ -604,15 +604,43 @@ declare const _default: {
|
|
|
604
604
|
readonly name: "lazuee";
|
|
605
605
|
readonly specifier: string;
|
|
606
606
|
})[];
|
|
607
|
-
overrides: {
|
|
607
|
+
overrides: ({
|
|
608
608
|
files: string[];
|
|
609
609
|
rules: {
|
|
610
|
-
[k: string]:
|
|
610
|
+
[k: string]: any;
|
|
611
611
|
};
|
|
612
|
-
}
|
|
612
|
+
} | {
|
|
613
|
+
files: string[];
|
|
614
|
+
rules: {
|
|
615
|
+
[k: string]: any;
|
|
616
|
+
};
|
|
617
|
+
} | {
|
|
618
|
+
files: string[];
|
|
619
|
+
rules: {
|
|
620
|
+
[k: string]: any;
|
|
621
|
+
};
|
|
622
|
+
})[];
|
|
613
623
|
rules: {
|
|
614
624
|
[k: string]: "error" | "off" | "warn" | ["error", number];
|
|
615
625
|
};
|
|
626
|
+
} | {
|
|
627
|
+
jsPlugins: {
|
|
628
|
+
name: string;
|
|
629
|
+
specifier: string;
|
|
630
|
+
}[];
|
|
631
|
+
rules: {
|
|
632
|
+
"no-comment-slop/max-comment-lines": "error";
|
|
633
|
+
"no-comment-slop/no-banner-comment": "error";
|
|
634
|
+
"no-comment-slop/no-trailing-comment": "error";
|
|
635
|
+
"no-comment-slop/prefer-jsdoc-for-exports": "error";
|
|
636
|
+
"no-comment-slop/prefer-jsdoc-for-members": "error";
|
|
637
|
+
"no-comment-slop/require-member-docs": "error";
|
|
638
|
+
"no-comment-slop/multiline-jsdoc-format": "error";
|
|
639
|
+
"no-comment-slop/no-trailing-period": "error";
|
|
640
|
+
"no-comment-slop/no-em-dash": "error";
|
|
641
|
+
"no-comment-slop/no-jargon": "error";
|
|
642
|
+
"no-comment-slop/no-foreign-syntax": "error";
|
|
643
|
+
};
|
|
616
644
|
} | {
|
|
617
645
|
plugins: ("jsx-a11y" | "react" | "react-perf")[];
|
|
618
646
|
rules: {
|
|
@@ -656,19 +684,14 @@ declare const _default: {
|
|
|
656
684
|
"react-perf/jsx-no-new-array-as-prop": "off";
|
|
657
685
|
"react-perf/jsx-no-new-function-as-prop": "off";
|
|
658
686
|
"react-perf/jsx-no-new-object-as-prop": "off";
|
|
659
|
-
"react/button-has-type": "error";
|
|
660
687
|
"react/capitalized-calls": "error";
|
|
661
|
-
"react/checked-requires-onchange-or-readonly": "error";
|
|
662
|
-
"react/display-name": "error";
|
|
663
688
|
"react/error-boundaries": "error";
|
|
664
689
|
"react/exhaustive-deps": "error";
|
|
665
690
|
"react/exhaustive-effect-dependencies": "error";
|
|
666
|
-
"react/forbid-component-props": "off";
|
|
667
|
-
"react/forbid-dom-props": "error";
|
|
668
|
-
"react/forbid-elements": "error";
|
|
669
691
|
"react/forward-ref-uses-ref": "off";
|
|
670
692
|
"react/function-component-definition": ["error", {
|
|
671
693
|
namedComponents: "arrow-function";
|
|
694
|
+
unnamedComponents: "arrow-function";
|
|
672
695
|
}];
|
|
673
696
|
"react/globals": "error";
|
|
674
697
|
"react/hook-use-state": "error";
|
|
@@ -677,50 +700,35 @@ declare const _default: {
|
|
|
677
700
|
"react/immutability": "error";
|
|
678
701
|
"react/incompatible-library": "error";
|
|
679
702
|
"react/invariant": "error";
|
|
680
|
-
"react/jsx-boolean-value": "off";
|
|
681
703
|
"react/jsx-curly-brace-presence": "error";
|
|
682
|
-
"react/jsx-filename-extension": "off";
|
|
683
704
|
"react/jsx-fragments": "error";
|
|
684
705
|
"react/jsx-key": "error";
|
|
685
|
-
"react/jsx-max-depth": "off";
|
|
686
706
|
"react/jsx-no-comment-textnodes": "error";
|
|
687
707
|
"react/jsx-no-constructed-context-values": "error";
|
|
688
708
|
"react/jsx-no-duplicate-props": "error";
|
|
689
|
-
"react/jsx-no-literals": "off";
|
|
690
|
-
"react/jsx-no-script-url": "error";
|
|
691
709
|
"react/jsx-no-target-blank": "error";
|
|
692
710
|
"react/jsx-no-undef": "error";
|
|
693
711
|
"react/jsx-no-useless-fragment": "error";
|
|
694
|
-
"react/jsx-pascal-case": "error";
|
|
695
712
|
"react/jsx-props-no-spread-multi": "error";
|
|
696
|
-
"react/jsx-props-no-spreading": "off";
|
|
697
713
|
"react/memo-dependencies": "error";
|
|
698
|
-
"react/no-array-index-key": "off";
|
|
699
714
|
"react/no-children-prop": "error";
|
|
700
715
|
"react/no-clone-element": "error";
|
|
701
|
-
"react/no-danger": "error";
|
|
702
716
|
"react/no-danger-with-children": "error";
|
|
703
717
|
"react/no-deriving-state-in-effects": "error";
|
|
704
|
-
"react/no-did-mount-set-state": "error";
|
|
705
718
|
"react/no-did-update-set-state": "error";
|
|
706
719
|
"react/no-direct-mutation-state": "error";
|
|
707
720
|
"react/no-find-dom-node": "error";
|
|
708
721
|
"react/no-is-mounted": "error";
|
|
709
|
-
"react/no-multi-comp": "off";
|
|
710
722
|
"react/no-namespace": "error";
|
|
711
|
-
"react/no-object-type-as-default-prop": "error";
|
|
712
723
|
"react/no-react-children": "error";
|
|
713
|
-
"react/no-redundant-should-component-update": "error";
|
|
714
724
|
"react/no-render-return-value": "error";
|
|
715
725
|
"react/no-set-state": "error";
|
|
716
726
|
"react/no-string-refs": "error";
|
|
717
727
|
"react/no-this-in-sfc": "error";
|
|
718
728
|
"react/no-unescaped-entities": "error";
|
|
719
729
|
"react/no-unknown-property": "off";
|
|
720
|
-
"react/no-unsafe": "error";
|
|
721
730
|
"react/no-unstable-nested-components": "error";
|
|
722
731
|
"react/no-will-update-set-state": "error";
|
|
723
|
-
"react/only-export-components": "off";
|
|
724
732
|
"react/prefer-es6-class": "error";
|
|
725
733
|
"react/prefer-function-component": "error";
|
|
726
734
|
"react/preserve-manual-memoization": "error";
|
|
@@ -742,6 +750,38 @@ declare const _default: {
|
|
|
742
750
|
"react/void-dom-elements-no-children": "error";
|
|
743
751
|
"react/void-use-memo": "error";
|
|
744
752
|
"react/jsx-handler-names": "off";
|
|
753
|
+
"react/only-export-components": ["warn", {
|
|
754
|
+
allowConstantExport: true;
|
|
755
|
+
}];
|
|
756
|
+
"react/button-has-type": ["off"];
|
|
757
|
+
"react/checked-requires-onchange-or-readonly": ["off"];
|
|
758
|
+
"react/display-name": ["off"];
|
|
759
|
+
"react/forbid-component-props": ["off"];
|
|
760
|
+
"react/forbid-dom-props": ["off"];
|
|
761
|
+
"react/forbid-elements": ["off"];
|
|
762
|
+
"react/jsx-boolean-value": ["error", "never"];
|
|
763
|
+
"react/jsx-filename-extension": ["error", {
|
|
764
|
+
extensions: string[];
|
|
765
|
+
}];
|
|
766
|
+
"react/jsx-max-depth": ["off"];
|
|
767
|
+
"react/jsx-no-literals": ["off"];
|
|
768
|
+
"react/jsx-no-script-url": ["error", {
|
|
769
|
+
name: string;
|
|
770
|
+
props: string[];
|
|
771
|
+
}[]];
|
|
772
|
+
"react/jsx-pascal-case": ["error", {
|
|
773
|
+
allowAllCaps: true;
|
|
774
|
+
}];
|
|
775
|
+
"react/jsx-props-no-spreading": [number, {
|
|
776
|
+
explicitSpread: "ignore";
|
|
777
|
+
}];
|
|
778
|
+
"react/no-array-index-key": ["off"];
|
|
779
|
+
"react/no-danger": ["warn"];
|
|
780
|
+
"react/no-did-mount-set-state": ["off"];
|
|
781
|
+
"react/no-multi-comp": ["off"];
|
|
782
|
+
"react/no-object-type-as-default-prop": ["off"];
|
|
783
|
+
"react/no-redundant-should-component-update": ["off"];
|
|
784
|
+
"react/no-unsafe": ["off"];
|
|
745
785
|
};
|
|
746
786
|
})[];
|
|
747
787
|
ignorePatterns: string[];
|
|
@@ -761,6 +801,12 @@ declare const _default: {
|
|
|
761
801
|
};
|
|
762
802
|
})[];
|
|
763
803
|
rules: {
|
|
804
|
+
/**
|
|
805
|
+
* Opinionated anti-slop rules that flag valid code: a comment above
|
|
806
|
+
* every type assertion and explicit named contracts like
|
|
807
|
+
* `Record<Theme, ThemeColors>`. Runtime `typeof` narrowing is how form
|
|
808
|
+
* data and `unknown` route errors are parsed before use.
|
|
809
|
+
*/
|
|
764
810
|
"anti-slop/require-safety-comment-for-type-assertion": "off";
|
|
765
811
|
"anti-slop/no-known-value-widening": "off";
|
|
766
812
|
"anti-slop/no-runtime-typeof": "off";
|
|
@@ -3,11 +3,14 @@ import {
|
|
|
3
3
|
} from "../../../chunk-08m6971b.js";
|
|
4
4
|
import {
|
|
5
5
|
selectJsPlugins
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-fqcw0kzp.js";
|
|
7
7
|
import"../../../chunk-41590bpf.js";
|
|
8
8
|
import {
|
|
9
9
|
reactConfig
|
|
10
|
-
} from "../../../chunk-
|
|
10
|
+
} from "../../../chunk-0xdbbpn5.js";
|
|
11
|
+
import {
|
|
12
|
+
noCommentSlopConfig
|
|
13
|
+
} from "../../../chunk-97s6xvc6.js";
|
|
11
14
|
import {
|
|
12
15
|
antiSlopConfig
|
|
13
16
|
} from "../../../chunk-c8jq73qx.js";
|
|
@@ -16,7 +19,13 @@ import"../../../chunk-5wgwscd0.js";
|
|
|
16
19
|
// tools/oxlint/config/index.ts
|
|
17
20
|
import { defineConfig } from "oxlint";
|
|
18
21
|
var config_default = defineConfig({
|
|
19
|
-
extends: [
|
|
22
|
+
extends: [
|
|
23
|
+
coreConfig,
|
|
24
|
+
reactConfig,
|
|
25
|
+
selectJsPlugins(["lazuee", "react-doctor"]),
|
|
26
|
+
antiSlopConfig,
|
|
27
|
+
noCommentSlopConfig
|
|
28
|
+
],
|
|
20
29
|
ignorePatterns: [...coreConfig.ignorePatterns ?? []],
|
|
21
30
|
overrides: [
|
|
22
31
|
{
|