ultracite 7.7.0 → 7.8.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/config/biome/tanstack/biome.jsonc +16 -0
- package/config/eslint/react/eslint.config.mjs +0 -4
- package/config/eslint/tanstack/eslint.config.mjs +34 -0
- package/config/eslint/tanstack/rules/router.mjs +13 -0
- package/config/eslint/tanstack/rules/start.mjs +13 -0
- package/config/oxlint/core/index.mjs +9 -0
- package/config/oxlint/react/index.mjs +6 -0
- package/config/oxlint/tanstack/index.d.mts +5 -0
- package/config/oxlint/tanstack/index.mjs +14 -0
- package/config/oxlint/vitest/index.mjs +1 -0
- package/dist/index.js +54 -52
- package/package.json +18 -16
- /package/config/eslint/{react → tanstack}/rules/query.mjs +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": false,
|
|
3
|
+
"$schema": "../../../node_modules/@biomejs/biome/configuration_schema.json",
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"includes": ["**/routes/**/*.{tsx,ts}", "**/app/routes/**/*.{tsx,ts}"],
|
|
7
|
+
"linter": {
|
|
8
|
+
"rules": {
|
|
9
|
+
"style": {
|
|
10
|
+
"useFilenamingConvention": "off"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
|
|
2
2
|
|
|
3
|
-
import query from "@tanstack/eslint-plugin-query";
|
|
4
3
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
5
4
|
import react from "eslint-plugin-react";
|
|
6
5
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
7
6
|
|
|
8
7
|
import jsxA11yRules from "./rules/jsx-a11y.mjs";
|
|
9
|
-
import queryRules from "./rules/query.mjs";
|
|
10
8
|
import reactHooksRules from "./rules/react-hooks.mjs";
|
|
11
9
|
import reactRules from "./rules/react.mjs";
|
|
12
10
|
|
|
@@ -21,7 +19,6 @@ const config = [
|
|
|
21
19
|
},
|
|
22
20
|
},
|
|
23
21
|
plugins: {
|
|
24
|
-
"@tanstack/query": query,
|
|
25
22
|
"jsx-a11y": jsxA11y,
|
|
26
23
|
react,
|
|
27
24
|
"react-hooks": reactHooks,
|
|
@@ -30,7 +27,6 @@ const config = [
|
|
|
30
27
|
...reactRules,
|
|
31
28
|
...reactHooksRules,
|
|
32
29
|
...jsxA11yRules,
|
|
33
|
-
...queryRules,
|
|
34
30
|
},
|
|
35
31
|
settings: {
|
|
36
32
|
react: {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
|
|
2
|
+
|
|
3
|
+
import query from "@tanstack/eslint-plugin-query";
|
|
4
|
+
import router from "@tanstack/eslint-plugin-router";
|
|
5
|
+
import start from "@tanstack/eslint-plugin-start";
|
|
6
|
+
|
|
7
|
+
import queryRules from "./rules/query.mjs";
|
|
8
|
+
import routerRules from "./rules/router.mjs";
|
|
9
|
+
import startRules from "./rules/start.mjs";
|
|
10
|
+
|
|
11
|
+
const config = [
|
|
12
|
+
{
|
|
13
|
+
files: ["**/*.jsx", "**/*.tsx"],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
parserOptions: {
|
|
16
|
+
ecmaFeatures: {
|
|
17
|
+
jsx: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
plugins: {
|
|
22
|
+
"@tanstack/query": query,
|
|
23
|
+
"@tanstack/router": router,
|
|
24
|
+
"@tanstack/start": start,
|
|
25
|
+
},
|
|
26
|
+
rules: {
|
|
27
|
+
...queryRules,
|
|
28
|
+
...routerRules,
|
|
29
|
+
...startRules,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
export default config;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import pluginRouter from "@tanstack/eslint-plugin-router";
|
|
2
|
+
|
|
3
|
+
const { rules } = pluginRouter;
|
|
4
|
+
|
|
5
|
+
const availableKeys = Object.keys(rules).filter(
|
|
6
|
+
(key) => !rules[key]?.meta?.deprecated
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const baseRules = Object.fromEntries(
|
|
10
|
+
availableKeys.map((key) => [`@tanstack/router/${key}`, "error"])
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default { ...baseRules };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import pluginStart from "@tanstack/eslint-plugin-start";
|
|
2
|
+
|
|
3
|
+
const { rules } = pluginStart;
|
|
4
|
+
|
|
5
|
+
const availableKeys = Object.keys(rules).filter(
|
|
6
|
+
(key) => !rules[key]?.meta?.deprecated
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const baseRules = Object.fromEntries(
|
|
10
|
+
availableKeys.map((key) => [`@tanstack/start/${key}`, "error"])
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default { ...baseRules };
|
|
@@ -61,6 +61,7 @@ export default defineConfig({
|
|
|
61
61
|
"grouped-accessor-pairs": "error",
|
|
62
62
|
"guard-for-in": "error",
|
|
63
63
|
"id-length": "off",
|
|
64
|
+
"id-match": "error",
|
|
64
65
|
"init-declarations": "off",
|
|
65
66
|
"logical-assignment-operators": "error",
|
|
66
67
|
"max-classes-per-file": "error",
|
|
@@ -113,6 +114,8 @@ export default defineConfig({
|
|
|
113
114
|
"no-func-assign": "error",
|
|
114
115
|
"no-global-assign": "error",
|
|
115
116
|
"no-implicit-coercion": "off",
|
|
117
|
+
"no-implicit-globals": "error",
|
|
118
|
+
"no-implied-eval": "error",
|
|
116
119
|
"no-import-assign": "error",
|
|
117
120
|
"no-inline-comments": "error",
|
|
118
121
|
"no-inner-declarations": "error",
|
|
@@ -192,6 +195,7 @@ export default defineConfig({
|
|
|
192
195
|
"no-with": "error",
|
|
193
196
|
"object-shorthand": "error",
|
|
194
197
|
"operator-assignment": "error",
|
|
198
|
+
"prefer-arrow-callback": "error",
|
|
195
199
|
"prefer-const": "error",
|
|
196
200
|
"prefer-destructuring": "error",
|
|
197
201
|
"prefer-exponentiation-operator": "error",
|
|
@@ -199,6 +203,7 @@ export default defineConfig({
|
|
|
199
203
|
"prefer-object-has-own": "error",
|
|
200
204
|
"prefer-object-spread": "error",
|
|
201
205
|
"prefer-promise-reject-errors": "error",
|
|
206
|
+
"prefer-regex-literals": "error",
|
|
202
207
|
"prefer-rest-params": "error",
|
|
203
208
|
"prefer-spread": "error",
|
|
204
209
|
"prefer-template": "error",
|
|
@@ -227,6 +232,7 @@ export default defineConfig({
|
|
|
227
232
|
"import/group-exports": "off",
|
|
228
233
|
"import/max-dependencies": "off",
|
|
229
234
|
"import/namespace": "error",
|
|
235
|
+
"import/newline-after-import": "error",
|
|
230
236
|
"import/no-absolute-path": "error",
|
|
231
237
|
"import/no-amd": "error",
|
|
232
238
|
"import/no-anonymous-default-export": "off",
|
|
@@ -268,7 +274,10 @@ export default defineConfig({
|
|
|
268
274
|
"jsdoc/require-returns": "off",
|
|
269
275
|
"jsdoc/require-returns-description": "error",
|
|
270
276
|
"jsdoc/require-returns-type": "off",
|
|
277
|
+
"jsdoc/require-throws-description": "error",
|
|
278
|
+
"jsdoc/require-throws-type": "error",
|
|
271
279
|
"jsdoc/require-yields": "error",
|
|
280
|
+
"jsdoc/require-yields-type": "error",
|
|
272
281
|
|
|
273
282
|
// ── node ───────────────────────────────────────────────────────────
|
|
274
283
|
"node/global-require": "error",
|
|
@@ -3,8 +3,12 @@ import { defineConfig } from "oxlint";
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
plugins: ["react", "react-perf", "jsx-a11y"],
|
|
5
5
|
rules: {
|
|
6
|
+
"jsx-a11y/control-has-associated-label": "error",
|
|
6
7
|
"jsx-a11y/interactive-supports-focus": "error",
|
|
7
8
|
"jsx-a11y/no-autofocus": "off",
|
|
9
|
+
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
10
|
+
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
11
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
8
12
|
"react-perf/jsx-no-jsx-as-prop": "off",
|
|
9
13
|
"react-perf/jsx-no-new-array-as-prop": "off",
|
|
10
14
|
"react-perf/jsx-no-new-object-as-prop": "off",
|
|
@@ -15,7 +19,9 @@ export default defineConfig({
|
|
|
15
19
|
"react/jsx-props-no-spreading": "off",
|
|
16
20
|
|
|
17
21
|
"react/no-multi-comp": "off",
|
|
22
|
+
"react/no-object-type-as-default-prop": "error",
|
|
18
23
|
"react/no-unknown-property": "off",
|
|
24
|
+
"react/no-unstable-nested-components": "error",
|
|
19
25
|
"react/only-export-components": "off",
|
|
20
26
|
|
|
21
27
|
"react/react-in-jsx-scope": "off",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineConfig } from "oxlint";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
overrides: [
|
|
5
|
+
{
|
|
6
|
+
files: ["**/routeTree.gen.ts"],
|
|
7
|
+
rules: {
|
|
8
|
+
"unicorn/filename-case": "off",
|
|
9
|
+
"unicorn/no-abusive-eslint-disable": "off",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
rules: {},
|
|
14
|
+
});
|
|
@@ -34,6 +34,7 @@ export default defineConfig({
|
|
|
34
34
|
"vitest/no-test-prefixes": "error",
|
|
35
35
|
"vitest/no-test-return-statement": "error",
|
|
36
36
|
"vitest/no-unneeded-async-expect-function": "error",
|
|
37
|
+
"vitest/padding-around-after-all-blocks": "error",
|
|
37
38
|
"vitest/prefer-called-exactly-once-with": "error",
|
|
38
39
|
"vitest/prefer-called-once": "error",
|
|
39
40
|
"vitest/prefer-called-with": "error",
|