@adbayb/stack 2.40.0-next-5ef9eef → 2.40.0-next-4118432
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/oxfmt/index.ts +4 -2
- package/configs/oxlint/index.ts +23 -5
- package/dist/configs/oxfmt.d.ts +3 -1
- package/dist/configs/oxfmt.js +2 -2
- package/dist/configs/oxlint.d.ts +62 -2
- package/dist/configs/oxlint.js +63 -45
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/configs/oxfmt/index.ts
CHANGED
|
@@ -29,10 +29,12 @@ const config = defineConfig({
|
|
|
29
29
|
vueIndentScriptAndStyle: false,
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
export const createConfig = (
|
|
32
|
+
export const createConfig = ({
|
|
33
|
+
overrides,
|
|
34
|
+
}: Required<Pick<OxfmtConfig, "overrides">>): OxfmtConfig => {
|
|
33
35
|
return {
|
|
34
36
|
...config,
|
|
35
|
-
|
|
37
|
+
overrides,
|
|
36
38
|
};
|
|
37
39
|
};
|
|
38
40
|
|
package/configs/oxlint/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ const JAVASCRIPT_EXTENSIONS = ["js", "jsx", "cjs", "mjs", "mjsx"];
|
|
|
7
7
|
const TYPESCRIPT_EXTENSIONS = ["ts", "tsx", "cts", "mts", "mtsx"];
|
|
8
8
|
const JAVASCRIPT_LIKE_EXTENSIONS = [...JAVASCRIPT_EXTENSIONS, ...TYPESCRIPT_EXTENSIONS];
|
|
9
9
|
const JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING = JAVASCRIPT_LIKE_EXTENSIONS.join(",");
|
|
10
|
+
const JAVASCRIPT_LIKE_FILES = [`**/*.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`];
|
|
10
11
|
|
|
11
12
|
const TEST_LIKE_FILES = [
|
|
12
13
|
`**/{test,test-d}.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
@@ -32,6 +33,21 @@ const config = defineConfig({
|
|
|
32
33
|
typeCheck: true,
|
|
33
34
|
},
|
|
34
35
|
overrides: [
|
|
36
|
+
{
|
|
37
|
+
files: ["**/*.d.ts"],
|
|
38
|
+
rules: {
|
|
39
|
+
"unicorn/require-module-specifiers": "off",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
files: JAVASCRIPT_LIKE_FILES,
|
|
44
|
+
rules: {
|
|
45
|
+
"typescript/no-unsafe-assignment": "off",
|
|
46
|
+
"typescript/no-unsafe-call": "off",
|
|
47
|
+
"typescript/no-unsafe-member-access": "off",
|
|
48
|
+
"typescript/no-unsafe-return": "off",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
35
51
|
{
|
|
36
52
|
files: TEST_LIKE_FILES,
|
|
37
53
|
plugins: ["vitest"],
|
|
@@ -83,7 +99,7 @@ const config = defineConfig({
|
|
|
83
99
|
"oxc",
|
|
84
100
|
"promise",
|
|
85
101
|
"react",
|
|
86
|
-
"react-perf",
|
|
102
|
+
// "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.
|
|
87
103
|
"typescript",
|
|
88
104
|
"unicorn",
|
|
89
105
|
],
|
|
@@ -254,6 +270,7 @@ const config = defineConfig({
|
|
|
254
270
|
"react/jsx-no-literals": "off",
|
|
255
271
|
"react/jsx-props-no-spreading": "off",
|
|
256
272
|
"react/no-multi-comp": "off",
|
|
273
|
+
"react/only-export-components": ["error", { allowConstantExport: true }],
|
|
257
274
|
"react/prefer-function-component": [
|
|
258
275
|
"error",
|
|
259
276
|
{ allowErrorBoundary: true, allowJsxUtilityClass: true },
|
|
@@ -269,6 +286,7 @@ const config = defineConfig({
|
|
|
269
286
|
"typescript/explicit-function-return-type": "off",
|
|
270
287
|
"typescript/explicit-module-boundary-types": "off",
|
|
271
288
|
"typescript/no-unsafe-type-assertion": "off",
|
|
289
|
+
"typescript/non-nullable-type-assertion-style": "off",
|
|
272
290
|
"unicorn/filename-case": "off",
|
|
273
291
|
"unicorn/import-style": "off",
|
|
274
292
|
"unicorn/no-array-for-each": "off",
|
|
@@ -277,12 +295,12 @@ const config = defineConfig({
|
|
|
277
295
|
},
|
|
278
296
|
});
|
|
279
297
|
|
|
280
|
-
export const createConfig = (
|
|
281
|
-
|
|
282
|
-
): OxlintConfig => {
|
|
298
|
+
export const createConfig = ({
|
|
299
|
+
ignorePatterns,
|
|
300
|
+
}: Required<Pick<OxlintConfig, "ignorePatterns">>): OxlintConfig => {
|
|
283
301
|
return {
|
|
284
302
|
...config,
|
|
285
|
-
|
|
303
|
+
ignorePatterns,
|
|
286
304
|
};
|
|
287
305
|
};
|
|
288
306
|
|
package/dist/configs/oxfmt.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ declare const config: {
|
|
|
28
28
|
useTabs: true;
|
|
29
29
|
vueIndentScriptAndStyle: false;
|
|
30
30
|
};
|
|
31
|
-
declare const createConfig: (
|
|
31
|
+
declare const createConfig: ({
|
|
32
|
+
overrides
|
|
33
|
+
}: Required<Pick<OxfmtConfig, "overrides">>) => OxfmtConfig;
|
|
32
34
|
//#endregion
|
|
33
35
|
export { createConfig, config as default };
|
package/dist/configs/oxfmt.js
CHANGED
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,6 +83,11 @@ 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;
|
|
@@ -51,6 +100,11 @@ declare const config: {
|
|
|
51
100
|
"import/no-anonymous-default-export": "off";
|
|
52
101
|
"import/no-default-export": "off";
|
|
53
102
|
"react/forbid-component-props": "off";
|
|
103
|
+
"unicorn/require-module-specifiers"?: never;
|
|
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;
|
|
54
108
|
"vitest/consistent-test-it"?: never;
|
|
55
109
|
"vitest/no-hooks"?: never;
|
|
56
110
|
"vitest/no-importing-vitest-globals"?: never;
|
|
@@ -62,7 +116,7 @@ declare const config: {
|
|
|
62
116
|
};
|
|
63
117
|
plugins?: never;
|
|
64
118
|
})[];
|
|
65
|
-
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jsx-a11y" | "
|
|
119
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jsx-a11y" | "promise" | "node")[];
|
|
66
120
|
rules: {
|
|
67
121
|
"@stylistic/jsx-pascal-case": "error";
|
|
68
122
|
"@stylistic/jsx-self-closing-comp": "error";
|
|
@@ -173,6 +227,9 @@ declare const config: {
|
|
|
173
227
|
"react/jsx-no-literals": "off";
|
|
174
228
|
"react/jsx-props-no-spreading": "off";
|
|
175
229
|
"react/no-multi-comp": "off";
|
|
230
|
+
"react/only-export-components": ["error", {
|
|
231
|
+
allowConstantExport: true;
|
|
232
|
+
}];
|
|
176
233
|
"react/prefer-function-component": ["error", {
|
|
177
234
|
allowErrorBoundary: true;
|
|
178
235
|
allowJsxUtilityClass: true;
|
|
@@ -188,6 +245,7 @@ declare const config: {
|
|
|
188
245
|
"typescript/explicit-function-return-type": "off";
|
|
189
246
|
"typescript/explicit-module-boundary-types": "off";
|
|
190
247
|
"typescript/no-unsafe-type-assertion": "off";
|
|
248
|
+
"typescript/non-nullable-type-assertion-style": "off";
|
|
191
249
|
"unicorn/filename-case": "off";
|
|
192
250
|
"unicorn/import-style": "off";
|
|
193
251
|
"unicorn/no-array-for-each": "off";
|
|
@@ -195,6 +253,8 @@ declare const config: {
|
|
|
195
253
|
"unicorn/no-useless-undefined": "off";
|
|
196
254
|
};
|
|
197
255
|
};
|
|
198
|
-
declare const createConfig: (
|
|
256
|
+
declare const createConfig: ({
|
|
257
|
+
ignorePatterns
|
|
258
|
+
}: Required<Pick<OxlintConfig, "ignorePatterns">>) => OxlintConfig;
|
|
199
259
|
//#endregion
|
|
200
260
|
export { createConfig, config as default };
|
package/dist/configs/oxlint.js
CHANGED
|
@@ -18,6 +18,7 @@ const TYPESCRIPT_EXTENSIONS = [
|
|
|
18
18
|
"mtsx"
|
|
19
19
|
];
|
|
20
20
|
const JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING = [...JAVASCRIPT_EXTENSIONS, ...TYPESCRIPT_EXTENSIONS].join(",");
|
|
21
|
+
const JAVASCRIPT_LIKE_FILES = [`**/*.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`];
|
|
21
22
|
const TEST_LIKE_FILES = [`**/{test,test-d}.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`, `**/*.{test,test-d}.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`];
|
|
22
23
|
const config = defineConfig({
|
|
23
24
|
categories: {
|
|
@@ -41,49 +42,65 @@ const config = defineConfig({
|
|
|
41
42
|
typeAware: true,
|
|
42
43
|
typeCheck: true
|
|
43
44
|
},
|
|
44
|
-
overrides: [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
45
|
+
overrides: [
|
|
46
|
+
{
|
|
47
|
+
files: ["**/*.d.ts"],
|
|
48
|
+
rules: { "unicorn/require-module-specifiers": "off" }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
files: JAVASCRIPT_LIKE_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
|
+
},
|
|
59
|
+
{
|
|
60
|
+
files: TEST_LIKE_FILES,
|
|
61
|
+
plugins: ["vitest"],
|
|
62
|
+
rules: {
|
|
63
|
+
"vitest/consistent-test-it": ["error", {
|
|
64
|
+
fn: "test",
|
|
65
|
+
withinDescribe: "test"
|
|
66
|
+
}],
|
|
67
|
+
"vitest/no-hooks": "off",
|
|
68
|
+
"vitest/no-importing-vitest-globals": "off",
|
|
69
|
+
"vitest/prefer-to-be-falsy": "off",
|
|
70
|
+
"vitest/prefer-to-be-truthy": "off",
|
|
71
|
+
"vitest/require-mock-type-parameters": "off",
|
|
72
|
+
"vitest/require-test-timeout": "off",
|
|
73
|
+
"vitest/valid-title": ["error", {
|
|
74
|
+
allowArguments: true,
|
|
75
|
+
mustMatch: { test: ["^should "] }
|
|
76
|
+
}]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
files: [
|
|
81
|
+
...TEST_LIKE_FILES,
|
|
82
|
+
"**/.config/**",
|
|
83
|
+
"**/.configs/**",
|
|
84
|
+
"**/config/**",
|
|
85
|
+
"**/configs/**",
|
|
86
|
+
"**/examples/**",
|
|
87
|
+
"**/scripts/**",
|
|
88
|
+
"**/tools/**",
|
|
89
|
+
`**/config.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
90
|
+
`**/configs.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
91
|
+
`**/*.config.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
92
|
+
`**/*.configs.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
93
|
+
`**/stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
94
|
+
`**/*.stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`
|
|
95
|
+
],
|
|
96
|
+
rules: {
|
|
97
|
+
"e18e/prefer-static-regex": "off",
|
|
98
|
+
"import/no-anonymous-default-export": "off",
|
|
99
|
+
"import/no-default-export": "off",
|
|
100
|
+
"react/forbid-component-props": "off"
|
|
101
|
+
}
|
|
85
102
|
}
|
|
86
|
-
|
|
103
|
+
],
|
|
87
104
|
plugins: [
|
|
88
105
|
"eslint",
|
|
89
106
|
"import",
|
|
@@ -93,7 +110,6 @@ const config = defineConfig({
|
|
|
93
110
|
"oxc",
|
|
94
111
|
"promise",
|
|
95
112
|
"react",
|
|
96
|
-
"react-perf",
|
|
97
113
|
"typescript",
|
|
98
114
|
"unicorn"
|
|
99
115
|
],
|
|
@@ -264,6 +280,7 @@ const config = defineConfig({
|
|
|
264
280
|
"react/jsx-no-literals": "off",
|
|
265
281
|
"react/jsx-props-no-spreading": "off",
|
|
266
282
|
"react/no-multi-comp": "off",
|
|
283
|
+
"react/only-export-components": ["error", { allowConstantExport: true }],
|
|
267
284
|
"react/prefer-function-component": ["error", {
|
|
268
285
|
allowErrorBoundary: true,
|
|
269
286
|
allowJsxUtilityClass: true
|
|
@@ -279,6 +296,7 @@ const config = defineConfig({
|
|
|
279
296
|
"typescript/explicit-function-return-type": "off",
|
|
280
297
|
"typescript/explicit-module-boundary-types": "off",
|
|
281
298
|
"typescript/no-unsafe-type-assertion": "off",
|
|
299
|
+
"typescript/non-nullable-type-assertion-style": "off",
|
|
282
300
|
"unicorn/filename-case": "off",
|
|
283
301
|
"unicorn/import-style": "off",
|
|
284
302
|
"unicorn/no-array-for-each": "off",
|
|
@@ -286,10 +304,10 @@ const config = defineConfig({
|
|
|
286
304
|
"unicorn/no-useless-undefined": "off"
|
|
287
305
|
}
|
|
288
306
|
});
|
|
289
|
-
const createConfig = (
|
|
307
|
+
const createConfig = ({ ignorePatterns }) => {
|
|
290
308
|
return {
|
|
291
309
|
...config,
|
|
292
|
-
|
|
310
|
+
ignorePatterns
|
|
293
311
|
};
|
|
294
312
|
};
|
|
295
313
|
|
package/dist/index.js
CHANGED