@coderwyd/eslint-config 3.4.0 → 3.6.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/dist/cli.cjs CHANGED
@@ -37,35 +37,30 @@ var import_helpers = require("yargs/helpers");
37
37
  var import_picocolors = __toESM(require("picocolors"), 1);
38
38
 
39
39
  // package.json
40
- var version = "3.4.0";
40
+ var version = "3.6.0";
41
41
  var devDependencies = {
42
- "@antfu/ni": "^0.23.1",
43
- "@eslint-react/eslint-plugin": "^1.19.0",
44
- "@eslint/config-inspector": "^0.6.0",
42
+ "@antfu/ni": "^23.2.0",
43
+ "@eslint-react/eslint-plugin": "^1.23.2",
44
+ "@eslint/config-inspector": "^1.0.0",
45
45
  "@types/eslint-config-prettier": "^6.11.3",
46
- "@types/fs-extra": "^11.0.4",
47
- "@types/node": "^22.10.2",
46
+ "@types/node": "^22.10.7",
48
47
  "@types/prompts": "^2.4.9",
49
48
  "@types/yargs": "^17.0.33",
50
- "@unocss/eslint-plugin": "^0.65.1",
51
- bumpp: "^9.9.1",
52
- eslint: "^9.17.0",
49
+ "@unocss/eslint-plugin": "^65.4.2",
50
+ bumpp: "^9.10.1",
51
+ eslint: "^9.18.0",
52
+ "eslint-plugin-react-compiler": "19.0.0-beta-decd7b8-20250118",
53
53
  "eslint-plugin-react-hooks": "^5.1.0",
54
- "eslint-plugin-react-refresh": "^0.4.16",
54
+ "eslint-plugin-react-refresh": "^0.4.18",
55
55
  "eslint-plugin-svelte": "^2.46.1",
56
- "eslint-plugin-tailwindcss": "^3.17.5",
57
- execa: "^9.5.2",
58
- "fast-glob": "^3.3.2",
59
- "fs-extra": "^11.2.0",
60
- jiti: "^2.4.1",
61
- "lint-staged": "^15.2.11",
62
- rimraf: "^6.0.1",
56
+ "eslint-plugin-tailwindcss": "^3.18.0",
57
+ jiti: "^2.4.2",
58
+ "nano-staged": "^0.8.0",
63
59
  "simple-git-hooks": "^2.11.1",
64
- svelte: "^5.14.0",
60
+ svelte: "^5.19.0",
65
61
  "svelte-eslint-parser": "^0.43.0",
66
62
  tsup: "^8.3.5",
67
- tsx: "^4.19.2",
68
- typescript: "^5.7.2"
63
+ typescript: "^5.7.3"
69
64
  };
70
65
 
71
66
  // src/cli/constants.ts
package/dist/cli.js CHANGED
@@ -8,35 +8,30 @@ import { hideBin } from "yargs/helpers";
8
8
  import c from "picocolors";
9
9
 
10
10
  // package.json
11
- var version = "3.4.0";
11
+ var version = "3.6.0";
12
12
  var devDependencies = {
13
- "@antfu/ni": "^0.23.1",
14
- "@eslint-react/eslint-plugin": "^1.19.0",
15
- "@eslint/config-inspector": "^0.6.0",
13
+ "@antfu/ni": "^23.2.0",
14
+ "@eslint-react/eslint-plugin": "^1.23.2",
15
+ "@eslint/config-inspector": "^1.0.0",
16
16
  "@types/eslint-config-prettier": "^6.11.3",
17
- "@types/fs-extra": "^11.0.4",
18
- "@types/node": "^22.10.2",
17
+ "@types/node": "^22.10.7",
19
18
  "@types/prompts": "^2.4.9",
20
19
  "@types/yargs": "^17.0.33",
21
- "@unocss/eslint-plugin": "^0.65.1",
22
- bumpp: "^9.9.1",
23
- eslint: "^9.17.0",
20
+ "@unocss/eslint-plugin": "^65.4.2",
21
+ bumpp: "^9.10.1",
22
+ eslint: "^9.18.0",
23
+ "eslint-plugin-react-compiler": "19.0.0-beta-decd7b8-20250118",
24
24
  "eslint-plugin-react-hooks": "^5.1.0",
25
- "eslint-plugin-react-refresh": "^0.4.16",
25
+ "eslint-plugin-react-refresh": "^0.4.18",
26
26
  "eslint-plugin-svelte": "^2.46.1",
27
- "eslint-plugin-tailwindcss": "^3.17.5",
28
- execa: "^9.5.2",
29
- "fast-glob": "^3.3.2",
30
- "fs-extra": "^11.2.0",
31
- jiti: "^2.4.1",
32
- "lint-staged": "^15.2.11",
33
- rimraf: "^6.0.1",
27
+ "eslint-plugin-tailwindcss": "^3.18.0",
28
+ jiti: "^2.4.2",
29
+ "nano-staged": "^0.8.0",
34
30
  "simple-git-hooks": "^2.11.1",
35
- svelte: "^5.14.0",
31
+ svelte: "^5.19.0",
36
32
  "svelte-eslint-parser": "^0.43.0",
37
33
  tsup: "^8.3.5",
38
- tsx: "^4.19.2",
39
- typescript: "^5.7.2"
34
+ typescript: "^5.7.3"
40
35
  };
41
36
 
42
37
  // src/cli/constants.ts
package/dist/index.cjs CHANGED
@@ -48,7 +48,7 @@ __export(src_exports, {
48
48
  });
49
49
  module.exports = __toCommonJS(src_exports);
50
50
 
51
- // node_modules/.pnpm/tsup@8.3.5_jiti@2.4.1_postcss@8.4.47_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
51
+ // node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.47_tsx@4.19.2_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
52
52
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
53
53
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
54
54
 
@@ -707,9 +707,16 @@ var RemixPackages = [
707
707
  "@remix-run/serve",
708
708
  "@remix-run/dev"
709
709
  ];
710
+ var ReactRouterPackages = [
711
+ "@react-router/node",
712
+ "@react-router/react",
713
+ "@react-router/serve",
714
+ "@react-router/dev"
715
+ ];
710
716
  var NextJsPackages = ["next"];
711
717
  var ReactRefreshAllowConstantExportPackages = ["vite"];
712
718
  var isUsingRemix = hasPackages(RemixPackages);
719
+ var isUsingReactRouter = hasPackages(ReactRouterPackages);
713
720
  var isUsingNext = hasPackages(NextJsPackages);
714
721
  var isAllowConstantExport = hasPackages(
715
722
  ReactRefreshAllowConstantExportPackages
@@ -736,24 +743,30 @@ async function react(options = {}) {
736
743
  const typeAwareRules = {
737
744
  "react/no-leaked-conditional-rendering": "warn"
738
745
  };
739
- const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all(
740
- [
741
- interopDefault(import("@eslint-react/eslint-plugin")),
742
- interopDefault(import("eslint-plugin-react-hooks")),
743
- interopDefault(import("eslint-plugin-react-refresh"))
744
- ]
745
- );
746
+ const [
747
+ pluginReact,
748
+ pluginReactHooks,
749
+ pluginReactRefresh,
750
+ pluginReactCompiler
751
+ ] = await Promise.all([
752
+ interopDefault(import("@eslint-react/eslint-plugin")),
753
+ interopDefault(import("eslint-plugin-react-hooks")),
754
+ interopDefault(import("eslint-plugin-react-refresh")),
755
+ interopDefault(import("eslint-plugin-react-compiler"))
756
+ ]);
746
757
  const plugins = pluginReact.configs.all.plugins;
747
758
  return [
748
759
  {
749
760
  name: "coderwyd/react/setup",
750
761
  plugins: {
751
762
  react: plugins["@eslint-react"],
763
+ "react-compiler": pluginReactCompiler,
752
764
  "react-dom": plugins["@eslint-react/dom"],
753
765
  "react-hooks": pluginReactHooks,
754
766
  "react-hooks-extra": plugins["@eslint-react/hooks-extra"],
755
767
  "react-naming-convention": plugins["@eslint-react/naming-convention"],
756
- "react-refresh": pluginReactRefresh
768
+ "react-refresh": pluginReactRefresh,
769
+ "react-web-api": plugins["@eslint-react/web-api"]
757
770
  }
758
771
  },
759
772
  {
@@ -768,6 +781,7 @@ async function react(options = {}) {
768
781
  },
769
782
  name: "coderwyd/react/rules",
770
783
  rules: {
784
+ "react-compiler/react-compiler": "warn",
771
785
  // recommended rules from @eslint-react/dom
772
786
  "react-dom/no-children-in-void-dom-elements": "warn",
773
787
  "react-dom/no-dangerously-set-innerhtml": "warn",
@@ -804,10 +818,15 @@ async function react(options = {}) {
804
818
  "viewport",
805
819
  "generateViewport"
806
820
  ] : [],
807
- ...isUsingRemix ? ["meta", "links", "headers", "loader", "action"] : []
821
+ ...isUsingRemix || isUsingReactRouter ? ["meta", "links", "headers", "loader", "action"] : []
808
822
  ]
809
823
  }
810
824
  ],
825
+ // recommended rules from @eslint-react/web-api
826
+ "react-web-api/no-leaked-event-listener": "warn",
827
+ "react-web-api/no-leaked-interval": "warn",
828
+ "react-web-api/no-leaked-resize-observer": "warn",
829
+ "react-web-api/no-leaked-timeout": "warn",
811
830
  // recommended rules from @eslint-react
812
831
  "react/ensure-forward-ref-using-ref": "warn",
813
832
  "react/jsx-no-duplicate-props": "warn",