@resolid/config 5.0.1 → 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.
@@ -1,7 +1,9 @@
1
1
  import { defineConfig } from "oxlint";
2
2
 
3
3
  export default defineConfig({
4
- categories: { correctness: "error", perf: "warn", style: "warn", suspicious: "warn" },
4
+ categories: {
5
+ correctness: "error",
6
+ },
5
7
  env: {
6
8
  builtin: true,
7
9
  es2022: true,
@@ -17,28 +19,29 @@ export default defineConfig({
17
19
  "**/.vercel",
18
20
  "**/.vite-inspect",
19
21
  ],
20
- plugins: ["eslint", "import"],
22
+ plugins: ["eslint", "oxc", "import"],
21
23
  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",
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",
43
46
  },
44
47
  });
package/oxlint/react.js CHANGED
@@ -11,49 +11,25 @@ export default defineConfig({
11
11
  specifier: "eslint-plugin-react-you-might-not-need-an-effect",
12
12
  },
13
13
  ],
14
- plugins: ["react", "react-perf", "jsx-a11y"],
14
+ plugins: ["react", "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",
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",
49
31
 
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",
54
32
  "react/exhaustive-deps": ["warn", { additionalHooks: "useIsomorphicEffect" }],
55
- "react/jsx-max-depth": ["warn", { max: 10 }],
56
- "react/jsx-props-no-spreading": "off",
57
33
  "react/only-export-components": [
58
34
  "warn",
59
35
  {
@@ -76,6 +52,34 @@ export default defineConfig({
76
52
  ],
77
53
  },
78
54
  ],
79
- "react/react-in-jsx-scope": "off",
55
+
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",
60
+ "react-hooks-js/component-hook-factories": "error",
61
+ "react-hooks-js/preserve-manual-memoization": "error",
62
+ "react-hooks-js/incompatible-library": "error",
63
+ "react-hooks-js/immutability": "error",
64
+ "react-hooks-js/globals": "error",
65
+ "react-hooks-js/refs": "error",
66
+ "react-hooks-js/set-state-in-effect": "error",
67
+ "react-hooks-js/error-boundaries": "error",
68
+ "react-hooks-js/purity": "error",
69
+ "react-hooks-js/set-state-in-render": "error",
70
+ "react-hooks-js/unsupported-syntax": "error",
71
+ "react-hooks-js/config": "error",
72
+ "react-hooks-js/gating": "error",
73
+
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",
80
84
  },
81
85
  });
@@ -5,11 +5,18 @@ export default defineConfig({
5
5
  extends: [javascriptConfig],
6
6
  plugins: ["typescript"],
7
7
  rules: {
8
- "typescript/consistent-generic-constructors": "off",
8
+ "typescript/ban-ts-comment": "error",
9
9
  "typescript/consistent-type-imports": "error",
10
- "typescript/consistent-type-definitions": "off",
10
+ "typescript/no-empty-object-type": "error",
11
+ "typescript/no-explicit-any": "error",
11
12
  "typescript/no-import-type-side-effects": "error",
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",
12
17
  "typescript/prefer-for-of": "error",
13
18
  "typescript/prefer-function-type": "error",
19
+ "typescript/prefer-nullish-coalescing": "error",
20
+ "typescript/prefer-optional-chain": "error",
14
21
  },
15
22
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolid/config",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Oxlint and Typescript config",
5
5
  "keywords": [
6
6
  "oxfmt",