@adbayb/stack 2.40.0-next-ae97ae3 → 2.40.0-next-14160b1
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/configs/oxlint/index.ts +20 -8
- package/dist/configs/oxlint.d.ts +57 -23
- package/dist/configs/oxlint.js +15 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/configs/oxlint/index.ts
CHANGED
|
@@ -4,6 +4,8 @@ import type { OxlintConfig } from "oxlint";
|
|
|
4
4
|
import { defineConfig } from "oxlint";
|
|
5
5
|
|
|
6
6
|
const JAVASCRIPT_EXTENSIONS = ["js", "jsx", "cjs", "mjs", "mjsx"];
|
|
7
|
+
const JAVASCRIPT_EXTENSIONS_AS_STRING = JAVASCRIPT_EXTENSIONS.join(",");
|
|
8
|
+
const JAVASCRIPT_FILES = [`**/*.{${JAVASCRIPT_EXTENSIONS_AS_STRING}}`];
|
|
7
9
|
const TYPESCRIPT_EXTENSIONS = ["ts", "tsx", "cts", "mts", "mtsx"];
|
|
8
10
|
const JAVASCRIPT_LIKE_EXTENSIONS = [...JAVASCRIPT_EXTENSIONS, ...TYPESCRIPT_EXTENSIONS];
|
|
9
11
|
const JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING = JAVASCRIPT_LIKE_EXTENSIONS.join(",");
|
|
@@ -32,6 +34,22 @@ const config = defineConfig({
|
|
|
32
34
|
typeCheck: true,
|
|
33
35
|
},
|
|
34
36
|
overrides: [
|
|
37
|
+
{
|
|
38
|
+
files: ["**/*.d.ts"],
|
|
39
|
+
rules: {
|
|
40
|
+
"unicorn/require-module-specifiers": "off",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
files: JAVASCRIPT_FILES,
|
|
45
|
+
rules: {
|
|
46
|
+
// Following disabled rules are required until this issue is resolved https://github.com/oxc-project/oxc/issues/20073
|
|
47
|
+
"typescript/no-unsafe-assignment": "off",
|
|
48
|
+
"typescript/no-unsafe-call": "off",
|
|
49
|
+
"typescript/no-unsafe-member-access": "off",
|
|
50
|
+
"typescript/no-unsafe-return": "off",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
35
53
|
{
|
|
36
54
|
files: TEST_LIKE_FILES,
|
|
37
55
|
plugins: ["vitest"],
|
|
@@ -73,12 +91,6 @@ const config = defineConfig({
|
|
|
73
91
|
"react/forbid-component-props": "off",
|
|
74
92
|
},
|
|
75
93
|
},
|
|
76
|
-
{
|
|
77
|
-
files: ["**/*.d.ts"],
|
|
78
|
-
rules: {
|
|
79
|
-
"unicorn/require-module-specifiers": "off",
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
94
|
],
|
|
83
95
|
plugins: [
|
|
84
96
|
"eslint",
|
|
@@ -89,7 +101,7 @@ const config = defineConfig({
|
|
|
89
101
|
"oxc",
|
|
90
102
|
"promise",
|
|
91
103
|
"react",
|
|
92
|
-
"react-perf",
|
|
104
|
+
// "react-perf", // is disabled because it flags patterns that are often harmless, its optimization rules don't align well with modern React performance guidance, it generates more noise than value, and we prefer profiling-driven optimizations over enforced manual optimizations.
|
|
93
105
|
"typescript",
|
|
94
106
|
"unicorn",
|
|
95
107
|
],
|
|
@@ -260,6 +272,7 @@ const config = defineConfig({
|
|
|
260
272
|
"react/jsx-no-literals": "off",
|
|
261
273
|
"react/jsx-props-no-spreading": "off",
|
|
262
274
|
"react/no-multi-comp": "off",
|
|
275
|
+
"react/only-export-components": ["error", { allowConstantExport: true }],
|
|
263
276
|
"react/prefer-function-component": [
|
|
264
277
|
"error",
|
|
265
278
|
{ allowErrorBoundary: true, allowJsxUtilityClass: true },
|
|
@@ -280,7 +293,6 @@ const config = defineConfig({
|
|
|
280
293
|
"unicorn/import-style": "off",
|
|
281
294
|
"unicorn/no-array-for-each": "off",
|
|
282
295
|
"unicorn/no-array-reduce": "off",
|
|
283
|
-
"unicorn/no-typeof-undefined": ["error", { checkGlobalVariables: true }],
|
|
284
296
|
"unicorn/no-useless-undefined": "off",
|
|
285
297
|
},
|
|
286
298
|
});
|
package/dist/configs/oxlint.d.ts
CHANGED
|
@@ -20,6 +20,50 @@ declare const config: {
|
|
|
20
20
|
typeCheck: true;
|
|
21
21
|
};
|
|
22
22
|
overrides: ({
|
|
23
|
+
files: string[];
|
|
24
|
+
rules: {
|
|
25
|
+
"unicorn/require-module-specifiers": "off";
|
|
26
|
+
"typescript/no-unsafe-assignment"?: never;
|
|
27
|
+
"typescript/no-unsafe-call"?: never;
|
|
28
|
+
"typescript/no-unsafe-member-access"?: never;
|
|
29
|
+
"typescript/no-unsafe-return"?: never;
|
|
30
|
+
"vitest/consistent-test-it"?: never;
|
|
31
|
+
"vitest/no-hooks"?: never;
|
|
32
|
+
"vitest/no-importing-vitest-globals"?: never;
|
|
33
|
+
"vitest/prefer-to-be-falsy"?: never;
|
|
34
|
+
"vitest/prefer-to-be-truthy"?: never;
|
|
35
|
+
"vitest/require-mock-type-parameters"?: never;
|
|
36
|
+
"vitest/require-test-timeout"?: never;
|
|
37
|
+
"vitest/valid-title"?: never;
|
|
38
|
+
"e18e/prefer-static-regex"?: never;
|
|
39
|
+
"import/no-anonymous-default-export"?: never;
|
|
40
|
+
"import/no-default-export"?: never;
|
|
41
|
+
"react/forbid-component-props"?: never;
|
|
42
|
+
};
|
|
43
|
+
plugins?: never;
|
|
44
|
+
} | {
|
|
45
|
+
files: string[];
|
|
46
|
+
rules: {
|
|
47
|
+
"typescript/no-unsafe-assignment": "off";
|
|
48
|
+
"typescript/no-unsafe-call": "off";
|
|
49
|
+
"typescript/no-unsafe-member-access": "off";
|
|
50
|
+
"typescript/no-unsafe-return": "off";
|
|
51
|
+
"unicorn/require-module-specifiers"?: never;
|
|
52
|
+
"vitest/consistent-test-it"?: never;
|
|
53
|
+
"vitest/no-hooks"?: never;
|
|
54
|
+
"vitest/no-importing-vitest-globals"?: never;
|
|
55
|
+
"vitest/prefer-to-be-falsy"?: never;
|
|
56
|
+
"vitest/prefer-to-be-truthy"?: never;
|
|
57
|
+
"vitest/require-mock-type-parameters"?: never;
|
|
58
|
+
"vitest/require-test-timeout"?: never;
|
|
59
|
+
"vitest/valid-title"?: never;
|
|
60
|
+
"e18e/prefer-static-regex"?: never;
|
|
61
|
+
"import/no-anonymous-default-export"?: never;
|
|
62
|
+
"import/no-default-export"?: never;
|
|
63
|
+
"react/forbid-component-props"?: never;
|
|
64
|
+
};
|
|
65
|
+
plugins?: never;
|
|
66
|
+
} | {
|
|
23
67
|
files: string[];
|
|
24
68
|
plugins: "vitest"[];
|
|
25
69
|
rules: {
|
|
@@ -39,11 +83,15 @@ declare const config: {
|
|
|
39
83
|
test: string[];
|
|
40
84
|
};
|
|
41
85
|
}];
|
|
86
|
+
"unicorn/require-module-specifiers"?: never;
|
|
87
|
+
"typescript/no-unsafe-assignment"?: never;
|
|
88
|
+
"typescript/no-unsafe-call"?: never;
|
|
89
|
+
"typescript/no-unsafe-member-access"?: never;
|
|
90
|
+
"typescript/no-unsafe-return"?: never;
|
|
42
91
|
"e18e/prefer-static-regex"?: never;
|
|
43
92
|
"import/no-anonymous-default-export"?: never;
|
|
44
93
|
"import/no-default-export"?: never;
|
|
45
94
|
"react/forbid-component-props"?: never;
|
|
46
|
-
"unicorn/require-module-specifiers"?: never;
|
|
47
95
|
};
|
|
48
96
|
} | {
|
|
49
97
|
files: string[];
|
|
@@ -52,21 +100,11 @@ declare const config: {
|
|
|
52
100
|
"import/no-anonymous-default-export": "off";
|
|
53
101
|
"import/no-default-export": "off";
|
|
54
102
|
"react/forbid-component-props": "off";
|
|
55
|
-
"vitest/consistent-test-it"?: never;
|
|
56
|
-
"vitest/no-hooks"?: never;
|
|
57
|
-
"vitest/no-importing-vitest-globals"?: never;
|
|
58
|
-
"vitest/prefer-to-be-falsy"?: never;
|
|
59
|
-
"vitest/prefer-to-be-truthy"?: never;
|
|
60
|
-
"vitest/require-mock-type-parameters"?: never;
|
|
61
|
-
"vitest/require-test-timeout"?: never;
|
|
62
|
-
"vitest/valid-title"?: never;
|
|
63
103
|
"unicorn/require-module-specifiers"?: never;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
rules: {
|
|
69
|
-
"unicorn/require-module-specifiers": "off";
|
|
104
|
+
"typescript/no-unsafe-assignment"?: never;
|
|
105
|
+
"typescript/no-unsafe-call"?: never;
|
|
106
|
+
"typescript/no-unsafe-member-access"?: never;
|
|
107
|
+
"typescript/no-unsafe-return"?: never;
|
|
70
108
|
"vitest/consistent-test-it"?: never;
|
|
71
109
|
"vitest/no-hooks"?: never;
|
|
72
110
|
"vitest/no-importing-vitest-globals"?: never;
|
|
@@ -75,14 +113,10 @@ declare const config: {
|
|
|
75
113
|
"vitest/require-mock-type-parameters"?: never;
|
|
76
114
|
"vitest/require-test-timeout"?: never;
|
|
77
115
|
"vitest/valid-title"?: never;
|
|
78
|
-
"e18e/prefer-static-regex"?: never;
|
|
79
|
-
"import/no-anonymous-default-export"?: never;
|
|
80
|
-
"import/no-default-export"?: never;
|
|
81
|
-
"react/forbid-component-props"?: never;
|
|
82
116
|
};
|
|
83
117
|
plugins?: never;
|
|
84
118
|
})[];
|
|
85
|
-
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jsx-a11y" | "
|
|
119
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jsx-a11y" | "promise" | "node")[];
|
|
86
120
|
rules: {
|
|
87
121
|
"@stylistic/jsx-pascal-case": "error";
|
|
88
122
|
"@stylistic/jsx-self-closing-comp": "error";
|
|
@@ -193,6 +227,9 @@ declare const config: {
|
|
|
193
227
|
"react/jsx-no-literals": "off";
|
|
194
228
|
"react/jsx-props-no-spreading": "off";
|
|
195
229
|
"react/no-multi-comp": "off";
|
|
230
|
+
"react/only-export-components": ["error", {
|
|
231
|
+
allowConstantExport: true;
|
|
232
|
+
}];
|
|
196
233
|
"react/prefer-function-component": ["error", {
|
|
197
234
|
allowErrorBoundary: true;
|
|
198
235
|
allowJsxUtilityClass: true;
|
|
@@ -213,9 +250,6 @@ declare const config: {
|
|
|
213
250
|
"unicorn/import-style": "off";
|
|
214
251
|
"unicorn/no-array-for-each": "off";
|
|
215
252
|
"unicorn/no-array-reduce": "off";
|
|
216
|
-
"unicorn/no-typeof-undefined": ["error", {
|
|
217
|
-
checkGlobalVariables: true;
|
|
218
|
-
}];
|
|
219
253
|
"unicorn/no-useless-undefined": "off";
|
|
220
254
|
};
|
|
221
255
|
};
|
package/dist/configs/oxlint.js
CHANGED
|
@@ -10,6 +10,7 @@ const JAVASCRIPT_EXTENSIONS = [
|
|
|
10
10
|
"mjs",
|
|
11
11
|
"mjsx"
|
|
12
12
|
];
|
|
13
|
+
const JAVASCRIPT_FILES = [`**/*.{${JAVASCRIPT_EXTENSIONS.join(",")}}`];
|
|
13
14
|
const TYPESCRIPT_EXTENSIONS = [
|
|
14
15
|
"ts",
|
|
15
16
|
"tsx",
|
|
@@ -42,6 +43,19 @@ const config = defineConfig({
|
|
|
42
43
|
typeCheck: true
|
|
43
44
|
},
|
|
44
45
|
overrides: [
|
|
46
|
+
{
|
|
47
|
+
files: ["**/*.d.ts"],
|
|
48
|
+
rules: { "unicorn/require-module-specifiers": "off" }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
files: JAVASCRIPT_FILES,
|
|
52
|
+
rules: {
|
|
53
|
+
"typescript/no-unsafe-assignment": "off",
|
|
54
|
+
"typescript/no-unsafe-call": "off",
|
|
55
|
+
"typescript/no-unsafe-member-access": "off",
|
|
56
|
+
"typescript/no-unsafe-return": "off"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
45
59
|
{
|
|
46
60
|
files: TEST_LIKE_FILES,
|
|
47
61
|
plugins: ["vitest"],
|
|
@@ -85,10 +99,6 @@ const config = defineConfig({
|
|
|
85
99
|
"import/no-default-export": "off",
|
|
86
100
|
"react/forbid-component-props": "off"
|
|
87
101
|
}
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
files: ["**/*.d.ts"],
|
|
91
|
-
rules: { "unicorn/require-module-specifiers": "off" }
|
|
92
102
|
}
|
|
93
103
|
],
|
|
94
104
|
plugins: [
|
|
@@ -100,7 +110,6 @@ const config = defineConfig({
|
|
|
100
110
|
"oxc",
|
|
101
111
|
"promise",
|
|
102
112
|
"react",
|
|
103
|
-
"react-perf",
|
|
104
113
|
"typescript",
|
|
105
114
|
"unicorn"
|
|
106
115
|
],
|
|
@@ -271,6 +280,7 @@ const config = defineConfig({
|
|
|
271
280
|
"react/jsx-no-literals": "off",
|
|
272
281
|
"react/jsx-props-no-spreading": "off",
|
|
273
282
|
"react/no-multi-comp": "off",
|
|
283
|
+
"react/only-export-components": ["error", { allowConstantExport: true }],
|
|
274
284
|
"react/prefer-function-component": ["error", {
|
|
275
285
|
allowErrorBoundary: true,
|
|
276
286
|
allowJsxUtilityClass: true
|
|
@@ -291,7 +301,6 @@ const config = defineConfig({
|
|
|
291
301
|
"unicorn/import-style": "off",
|
|
292
302
|
"unicorn/no-array-for-each": "off",
|
|
293
303
|
"unicorn/no-array-reduce": "off",
|
|
294
|
-
"unicorn/no-typeof-undefined": ["error", { checkGlobalVariables: true }],
|
|
295
304
|
"unicorn/no-useless-undefined": "off"
|
|
296
305
|
}
|
|
297
306
|
});
|
package/dist/index.js
CHANGED