@resolid/config 5.0.0 → 5.0.1
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/oxlint/javascript.js +25 -4
- package/oxlint/react.js +42 -34
- package/oxlint/typescript.js +5 -3
- package/package.json +1 -1
package/oxlint/javascript.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { defineConfig } from "oxlint";
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
|
-
categories: {
|
|
5
|
-
correctness: "warn",
|
|
6
|
-
},
|
|
4
|
+
categories: { correctness: "error", perf: "warn", style: "warn", suspicious: "warn" },
|
|
7
5
|
env: {
|
|
8
6
|
builtin: true,
|
|
9
7
|
es2022: true,
|
|
10
8
|
},
|
|
11
|
-
plugins: ["eslint", "import"],
|
|
12
9
|
ignorePatterns: [
|
|
13
10
|
"**/build",
|
|
14
11
|
"**/coverage",
|
|
@@ -20,4 +17,28 @@ export default defineConfig({
|
|
|
20
17
|
"**/.vercel",
|
|
21
18
|
"**/.vite-inspect",
|
|
22
19
|
],
|
|
20
|
+
plugins: ["eslint", "import"],
|
|
21
|
+
rules: {
|
|
22
|
+
"capitalized-comments": "off",
|
|
23
|
+
"func-style": "off",
|
|
24
|
+
"id-length": "off",
|
|
25
|
+
"import/consistent-type-specifier-style": "off",
|
|
26
|
+
"import/exports-last": "off",
|
|
27
|
+
"import/group-exports": "off",
|
|
28
|
+
"import/no-anonymous-default-export": "off",
|
|
29
|
+
"import/no-named-export": "off",
|
|
30
|
+
"import/no-nodejs-modules": "off",
|
|
31
|
+
"import/prefer-default-export": "off",
|
|
32
|
+
"init-declarations": "off",
|
|
33
|
+
"max-params": ["warn", { max: 10 }],
|
|
34
|
+
"max-statements": "off",
|
|
35
|
+
"new-cap": "off",
|
|
36
|
+
"no-continue": "off",
|
|
37
|
+
"no-implicit-coercion": "off",
|
|
38
|
+
"no-magic-numbers": "off",
|
|
39
|
+
"no-nested-ternary": "off",
|
|
40
|
+
"no-ternary": "off",
|
|
41
|
+
"sort-imports": "off",
|
|
42
|
+
"sort-keys": "off",
|
|
43
|
+
},
|
|
23
44
|
});
|
package/oxlint/react.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineConfig } from "oxlint";
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
|
-
plugins: ["react", "react-perf", "jsx-a11y"],
|
|
5
4
|
jsPlugins: [
|
|
6
5
|
{
|
|
7
6
|
name: "react-hooks-js",
|
|
@@ -12,8 +11,49 @@ export default defineConfig({
|
|
|
12
11
|
specifier: "eslint-plugin-react-you-might-not-need-an-effect",
|
|
13
12
|
},
|
|
14
13
|
],
|
|
14
|
+
plugins: ["react", "react-perf", "jsx-a11y"],
|
|
15
15
|
rules: {
|
|
16
|
+
"react-hooks-js/automatic-effect-dependencies": "off",
|
|
17
|
+
"react-hooks-js/capitalized-calls": "off",
|
|
18
|
+
"react-hooks-js/component-hook-factories": "error",
|
|
19
|
+
|
|
20
|
+
// Recommended rules (from LintRulePreset.Recommended)
|
|
21
|
+
"react-hooks-js/config": "error",
|
|
22
|
+
"react-hooks-js/error-boundaries": "error",
|
|
23
|
+
"react-hooks-js/fbt": "off",
|
|
24
|
+
"react-hooks-js/fire": "off",
|
|
25
|
+
"react-hooks-js/gating": "error",
|
|
26
|
+
"react-hooks-js/globals": "error",
|
|
27
|
+
"react-hooks-js/hooks": "off",
|
|
28
|
+
"react-hooks-js/immutability": "error",
|
|
29
|
+
"react-hooks-js/incompatible-library": "error",
|
|
30
|
+
"react-hooks-js/invariant": "off",
|
|
31
|
+
"react-hooks-js/memoized-effect-dependencies": "off",
|
|
32
|
+
"react-hooks-js/no-deriving-state-in-effects": "off",
|
|
33
|
+
"react-hooks-js/preserve-manual-memoization": "error",
|
|
34
|
+
"react-hooks-js/purity": "error",
|
|
35
|
+
"react-hooks-js/refs": "error",
|
|
36
|
+
|
|
37
|
+
// Recommended-latest rules (from LintRulePreset.RecommendedLatest)
|
|
38
|
+
"react-hooks-js/rule-suppression": "off",
|
|
39
|
+
|
|
40
|
+
// Off rules (LintRulePreset.Off) - not enabled by default
|
|
41
|
+
"react-hooks-js/set-state-in-effect": "error",
|
|
42
|
+
"react-hooks-js/set-state-in-render": "error",
|
|
43
|
+
"react-hooks-js/static-components": "error",
|
|
44
|
+
"react-hooks-js/syntax": "off",
|
|
45
|
+
"react-hooks-js/todo": "off",
|
|
46
|
+
"react-hooks-js/unsupported-syntax": "error",
|
|
47
|
+
"react-hooks-js/use-memo": "error",
|
|
48
|
+
"react-hooks-js/void-use-memo": "error",
|
|
49
|
+
|
|
50
|
+
"react-perf/jsx-no-jsx-as-prop": "off",
|
|
51
|
+
"react-perf/jsx-no-new-array-as-prop": "off",
|
|
52
|
+
"react-perf/jsx-no-new-function-as-prop": "off",
|
|
53
|
+
"react-perf/jsx-no-new-object-as-prop": "off",
|
|
16
54
|
"react/exhaustive-deps": ["warn", { additionalHooks: "useIsomorphicEffect" }],
|
|
55
|
+
"react/jsx-max-depth": ["warn", { max: 10 }],
|
|
56
|
+
"react/jsx-props-no-spreading": "off",
|
|
17
57
|
"react/only-export-components": [
|
|
18
58
|
"warn",
|
|
19
59
|
{
|
|
@@ -36,38 +76,6 @@ export default defineConfig({
|
|
|
36
76
|
],
|
|
37
77
|
},
|
|
38
78
|
],
|
|
39
|
-
|
|
40
|
-
// Recommended rules (from LintRulePreset.Recommended)
|
|
41
|
-
"react-hooks-js/component-hook-factories": "error",
|
|
42
|
-
"react-hooks-js/config": "error",
|
|
43
|
-
"react-hooks-js/error-boundaries": "error",
|
|
44
|
-
"react-hooks-js/gating": "error",
|
|
45
|
-
"react-hooks-js/globals": "error",
|
|
46
|
-
"react-hooks-js/immutability": "error",
|
|
47
|
-
"react-hooks-js/incompatible-library": "error",
|
|
48
|
-
"react-hooks-js/preserve-manual-memoization": "error",
|
|
49
|
-
"react-hooks-js/purity": "error",
|
|
50
|
-
"react-hooks-js/refs": "error",
|
|
51
|
-
"react-hooks-js/set-state-in-effect": "error",
|
|
52
|
-
"react-hooks-js/set-state-in-render": "error",
|
|
53
|
-
"react-hooks-js/static-components": "error",
|
|
54
|
-
"react-hooks-js/unsupported-syntax": "error",
|
|
55
|
-
"react-hooks-js/use-memo": "error",
|
|
56
|
-
|
|
57
|
-
// Recommended-latest rules (from LintRulePreset.RecommendedLatest)
|
|
58
|
-
"react-hooks-js/void-use-memo": "error",
|
|
59
|
-
|
|
60
|
-
// Off rules (LintRulePreset.Off) - not enabled by default
|
|
61
|
-
"react-hooks-js/automatic-effect-dependencies": "off",
|
|
62
|
-
"react-hooks-js/capitalized-calls": "off",
|
|
63
|
-
"react-hooks-js/fbt": "off",
|
|
64
|
-
"react-hooks-js/fire": "off",
|
|
65
|
-
"react-hooks-js/hooks": "off",
|
|
66
|
-
"react-hooks-js/invariant": "off",
|
|
67
|
-
"react-hooks-js/memoized-effect-dependencies": "off",
|
|
68
|
-
"react-hooks-js/no-deriving-state-in-effects": "off",
|
|
69
|
-
"react-hooks-js/rule-suppression": "off",
|
|
70
|
-
"react-hooks-js/syntax": "off",
|
|
71
|
-
"react-hooks-js/todo": "off",
|
|
79
|
+
"react/react-in-jsx-scope": "off",
|
|
72
80
|
},
|
|
73
81
|
});
|
package/oxlint/typescript.js
CHANGED
|
@@ -2,12 +2,14 @@ import { defineConfig } from "oxlint";
|
|
|
2
2
|
import javascriptConfig from "./javascript.js";
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
|
+
extends: [javascriptConfig],
|
|
5
6
|
plugins: ["typescript"],
|
|
6
7
|
rules: {
|
|
8
|
+
"typescript/consistent-generic-constructors": "off",
|
|
9
|
+
"typescript/consistent-type-imports": "error",
|
|
10
|
+
"typescript/consistent-type-definitions": "off",
|
|
7
11
|
"typescript/no-import-type-side-effects": "error",
|
|
8
|
-
"typescript/prefer-function-type": "error",
|
|
9
12
|
"typescript/prefer-for-of": "error",
|
|
10
|
-
"typescript/
|
|
13
|
+
"typescript/prefer-function-type": "error",
|
|
11
14
|
},
|
|
12
|
-
extends: [javascriptConfig],
|
|
13
15
|
});
|