@resolid/config 5.0.0 → 5.0.2
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 +26 -2
- package/oxlint/react.js +38 -26
- package/oxlint/typescript.js +12 -3
- package/package.json +1 -1
package/oxlint/javascript.js
CHANGED
|
@@ -2,13 +2,12 @@ import { defineConfig } from "oxlint";
|
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
categories: {
|
|
5
|
-
correctness: "
|
|
5
|
+
correctness: "error",
|
|
6
6
|
},
|
|
7
7
|
env: {
|
|
8
8
|
builtin: true,
|
|
9
9
|
es2022: true,
|
|
10
10
|
},
|
|
11
|
-
plugins: ["eslint", "import"],
|
|
12
11
|
ignorePatterns: [
|
|
13
12
|
"**/build",
|
|
14
13
|
"**/coverage",
|
|
@@ -20,4 +19,29 @@ export default defineConfig({
|
|
|
20
19
|
"**/.vercel",
|
|
21
20
|
"**/.vite-inspect",
|
|
22
21
|
],
|
|
22
|
+
plugins: ["eslint", "oxc", "import"],
|
|
23
|
+
rules: {
|
|
24
|
+
"no-case-declarations": "error",
|
|
25
|
+
"no-empty": "error",
|
|
26
|
+
"no-fallthrough": "error",
|
|
27
|
+
"no-prototype-builtins": "error",
|
|
28
|
+
"no-regex-spaces": "error",
|
|
29
|
+
"no-unexpected-multiline": "error",
|
|
30
|
+
"no-var": "error",
|
|
31
|
+
"prefer-const": "error",
|
|
32
|
+
"prefer-rest-params": "error",
|
|
33
|
+
"prefer-spread": "error",
|
|
34
|
+
"prefer-template": "warn",
|
|
35
|
+
"prefer-destructuring": "warn",
|
|
36
|
+
"prefer-object-spread": "warn",
|
|
37
|
+
"prefer-exponentiation-operator": "warn",
|
|
38
|
+
"prefer-numeric-literals": "warn",
|
|
39
|
+
"no-array-constructor": "error",
|
|
40
|
+
|
|
41
|
+
"import/export": "error",
|
|
42
|
+
"import/named": "error",
|
|
43
|
+
"import/no-named-as-default": "warn",
|
|
44
|
+
"import/no-named-as-default-member": "warn",
|
|
45
|
+
"import/no-duplicates": "warn",
|
|
46
|
+
},
|
|
23
47
|
});
|
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,7 +11,24 @@ export default defineConfig({
|
|
|
12
11
|
specifier: "eslint-plugin-react-you-might-not-need-an-effect",
|
|
13
12
|
},
|
|
14
13
|
],
|
|
14
|
+
plugins: ["react", "jsx-a11y"],
|
|
15
15
|
rules: {
|
|
16
|
+
"react/display-name": "error",
|
|
17
|
+
"react/jsx-key": "error",
|
|
18
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
19
|
+
"react/jsx-no-target-blank": "error",
|
|
20
|
+
"react/no-unescaped-entities": "error",
|
|
21
|
+
"react/no-unknown-property": "error",
|
|
22
|
+
"react/no-unsafe": "off",
|
|
23
|
+
"react/react-in-jsx-scope": "off",
|
|
24
|
+
"react/require-render-return": "error",
|
|
25
|
+
"react/rules-of-hooks": "error",
|
|
26
|
+
"react/self-closing-comp": "error",
|
|
27
|
+
"react/jsx-boolean-value": "error",
|
|
28
|
+
"react/jsx-pascal-case": "error",
|
|
29
|
+
"react/jsx-curly-brace-presence": "warn",
|
|
30
|
+
"react/jsx-no-useless-fragment": "warn",
|
|
31
|
+
|
|
16
32
|
"react/exhaustive-deps": ["warn", { additionalHooks: "useIsomorphicEffect" }],
|
|
17
33
|
"react/only-export-components": [
|
|
18
34
|
"warn",
|
|
@@ -37,37 +53,33 @@ export default defineConfig({
|
|
|
37
53
|
},
|
|
38
54
|
],
|
|
39
55
|
|
|
40
|
-
//
|
|
56
|
+
// react-hooks-js Recommended
|
|
57
|
+
"react-hooks-js/static-components": "error",
|
|
58
|
+
"react-hooks-js/use-memo": "error",
|
|
59
|
+
"react-hooks-js/void-use-memo": "error",
|
|
41
60
|
"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
61
|
"react-hooks-js/preserve-manual-memoization": "error",
|
|
49
|
-
"react-hooks-js/
|
|
62
|
+
"react-hooks-js/incompatible-library": "error",
|
|
63
|
+
"react-hooks-js/immutability": "error",
|
|
64
|
+
"react-hooks-js/globals": "error",
|
|
50
65
|
"react-hooks-js/refs": "error",
|
|
51
66
|
"react-hooks-js/set-state-in-effect": "error",
|
|
67
|
+
"react-hooks-js/error-boundaries": "error",
|
|
68
|
+
"react-hooks-js/purity": "error",
|
|
52
69
|
"react-hooks-js/set-state-in-render": "error",
|
|
53
|
-
"react-hooks-js/static-components": "error",
|
|
54
70
|
"react-hooks-js/unsupported-syntax": "error",
|
|
55
|
-
"react-hooks-js/
|
|
56
|
-
|
|
57
|
-
// Recommended-latest rules (from LintRulePreset.RecommendedLatest)
|
|
58
|
-
"react-hooks-js/void-use-memo": "error",
|
|
71
|
+
"react-hooks-js/config": "error",
|
|
72
|
+
"react-hooks-js/gating": "error",
|
|
59
73
|
|
|
60
|
-
//
|
|
61
|
-
"react-
|
|
62
|
-
"react-
|
|
63
|
-
"react-
|
|
64
|
-
"react-
|
|
65
|
-
"react-
|
|
66
|
-
"react-
|
|
67
|
-
"react-
|
|
68
|
-
"react-
|
|
69
|
-
"react-
|
|
70
|
-
"react-hooks-js/syntax": "off",
|
|
71
|
-
"react-hooks-js/todo": "off",
|
|
74
|
+
// react-you-might-not-need-an-effect-js Recommended
|
|
75
|
+
"react-you-might-not-need-an-effect-js/no-empty-effect": "warn",
|
|
76
|
+
"react-you-might-not-need-an-effect-js/no-adjust-state-on-prop-change": "warn",
|
|
77
|
+
"react-you-might-not-need-an-effect-js/no-reset-all-state-on-prop-change": "warn",
|
|
78
|
+
"react-you-might-not-need-an-effect-js/no-event-handler": "warn",
|
|
79
|
+
"react-you-might-not-need-an-effect-js/no-pass-live-state-to-parent": "warn",
|
|
80
|
+
"react-you-might-not-need-an-effect-js/no-pass-data-to-parent": "warn",
|
|
81
|
+
"react-you-might-not-need-an-effect-js/no-initialize-state": "warn",
|
|
82
|
+
"react-you-might-not-need-an-effect-js/no-chain-state-updates": "warn",
|
|
83
|
+
"react-you-might-not-need-an-effect-js/no-derived-state": "warn",
|
|
72
84
|
},
|
|
73
85
|
});
|
package/oxlint/typescript.js
CHANGED
|
@@ -2,12 +2,21 @@ 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/ban-ts-comment": "error",
|
|
9
|
+
"typescript/consistent-type-imports": "error",
|
|
10
|
+
"typescript/no-empty-object-type": "error",
|
|
11
|
+
"typescript/no-explicit-any": "error",
|
|
7
12
|
"typescript/no-import-type-side-effects": "error",
|
|
8
|
-
"typescript/
|
|
13
|
+
"typescript/no-namespace": "error",
|
|
14
|
+
"typescript/no-require-imports": "error",
|
|
15
|
+
"typescript/no-unnecessary-type-constraint": "error",
|
|
16
|
+
"typescript/no-unsafe-function-type": "error",
|
|
9
17
|
"typescript/prefer-for-of": "error",
|
|
10
|
-
"typescript/
|
|
18
|
+
"typescript/prefer-function-type": "error",
|
|
19
|
+
"typescript/prefer-nullish-coalescing": "error",
|
|
20
|
+
"typescript/prefer-optional-chain": "error",
|
|
11
21
|
},
|
|
12
|
-
extends: [javascriptConfig],
|
|
13
22
|
});
|