@coderwyd/eslint-config 2.7.1 → 2.7.3

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,25 +37,24 @@ var import_helpers = require("yargs/helpers");
37
37
  var import_picocolors = __toESM(require("picocolors"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.7.1";
40
+ var version = "2.7.3";
41
41
  var devDependencies = {
42
42
  "@antfu/ni": "^0.23.0",
43
- "@eslint-react/eslint-plugin": "^1.13.0",
43
+ "@eslint-react/eslint-plugin": "^1.14.2",
44
44
  "@eslint/config-inspector": "^0.5.4",
45
- "@stylistic/eslint-plugin-migrate": "^2.7.2",
46
- "@types/eslint": "^9.6.1",
45
+ "@stylistic/eslint-plugin-migrate": "^2.8.0",
47
46
  "@types/fs-extra": "^11.0.4",
48
- "@types/node": "^22.5.4",
47
+ "@types/node": "^22.6.1",
49
48
  "@types/prompts": "^2.4.9",
50
49
  "@types/yargs": "^17.0.33",
51
- "@unocss/eslint-plugin": "^0.62.3",
50
+ "@unocss/eslint-plugin": "^0.62.4",
52
51
  bumpp: "^9.5.2",
53
- eslint: "^9.9.1",
52
+ eslint: "^9.11.1",
54
53
  "eslint-plugin-react-hooks": "^4.6.2",
55
- "eslint-plugin-react-refresh": "^0.4.11",
54
+ "eslint-plugin-react-refresh": "^0.4.12",
56
55
  "eslint-plugin-svelte": "2.43.0",
57
56
  "eslint-plugin-tailwindcss": "^3.17.4",
58
- execa: "^9.3.1",
57
+ execa: "^9.4.0",
59
58
  "fast-glob": "^3.3.2",
60
59
  "fs-extra": "^11.2.0",
61
60
  jiti: "^1.21.6",
@@ -63,10 +62,10 @@ var devDependencies = {
63
62
  rimraf: "^6.0.1",
64
63
  "simple-git-hooks": "^2.11.1",
65
64
  svelte: "^4.2.19",
66
- "svelte-eslint-parser": "^0.41.0",
67
- tsup: "^8.2.4",
68
- tsx: "^4.19.0",
69
- typescript: "^5.5.4"
65
+ "svelte-eslint-parser": "^0.41.1",
66
+ tsup: "^8.3.0",
67
+ tsx: "^4.19.1",
68
+ typescript: "^5.6.2"
70
69
  };
71
70
 
72
71
  // src/cli/constants.ts
package/dist/cli.js CHANGED
@@ -8,25 +8,24 @@ import { hideBin } from "yargs/helpers";
8
8
  import c from "picocolors";
9
9
 
10
10
  // package.json
11
- var version = "2.7.1";
11
+ var version = "2.7.3";
12
12
  var devDependencies = {
13
13
  "@antfu/ni": "^0.23.0",
14
- "@eslint-react/eslint-plugin": "^1.13.0",
14
+ "@eslint-react/eslint-plugin": "^1.14.2",
15
15
  "@eslint/config-inspector": "^0.5.4",
16
- "@stylistic/eslint-plugin-migrate": "^2.7.2",
17
- "@types/eslint": "^9.6.1",
16
+ "@stylistic/eslint-plugin-migrate": "^2.8.0",
18
17
  "@types/fs-extra": "^11.0.4",
19
- "@types/node": "^22.5.4",
18
+ "@types/node": "^22.6.1",
20
19
  "@types/prompts": "^2.4.9",
21
20
  "@types/yargs": "^17.0.33",
22
- "@unocss/eslint-plugin": "^0.62.3",
21
+ "@unocss/eslint-plugin": "^0.62.4",
23
22
  bumpp: "^9.5.2",
24
- eslint: "^9.9.1",
23
+ eslint: "^9.11.1",
25
24
  "eslint-plugin-react-hooks": "^4.6.2",
26
- "eslint-plugin-react-refresh": "^0.4.11",
25
+ "eslint-plugin-react-refresh": "^0.4.12",
27
26
  "eslint-plugin-svelte": "2.43.0",
28
27
  "eslint-plugin-tailwindcss": "^3.17.4",
29
- execa: "^9.3.1",
28
+ execa: "^9.4.0",
30
29
  "fast-glob": "^3.3.2",
31
30
  "fs-extra": "^11.2.0",
32
31
  jiti: "^1.21.6",
@@ -34,10 +33,10 @@ var devDependencies = {
34
33
  rimraf: "^6.0.1",
35
34
  "simple-git-hooks": "^2.11.1",
36
35
  svelte: "^4.2.19",
37
- "svelte-eslint-parser": "^0.41.0",
38
- tsup: "^8.2.4",
39
- tsx: "^4.19.0",
40
- typescript: "^5.5.4"
36
+ "svelte-eslint-parser": "^0.41.1",
37
+ tsup: "^8.3.0",
38
+ tsx: "^4.19.1",
39
+ typescript: "^5.6.2"
41
40
  };
42
41
 
43
42
  // 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.2.4_jiti@1.21.6_postcss@8.4.39_tsx@4.19.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
51
+ // node_modules/.pnpm/tsup@8.3.0_jiti@1.21.6_postcss@8.4.39_tsx@4.19.1_typescript@5.6.2_yaml@2.5.0/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
 
@@ -158,18 +158,19 @@ var GLOB_EXCLUDE = [
158
158
  function disables() {
159
159
  return [
160
160
  {
161
- files: [`scripts/${GLOB_SRC}`],
161
+ files: [`**/scripts/${GLOB_SRC}`],
162
162
  name: "coderwyd/disables/scripts",
163
163
  rules: {
164
+ "antfu/no-top-level-await": "off",
164
165
  "no-console": "off",
165
- "ts/explicit-function-return-type": "off",
166
- "unicorn/consistent-function-scoping": "off"
166
+ "ts/explicit-function-return-type": "off"
167
167
  }
168
168
  },
169
169
  {
170
- files: [`cli/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
170
+ files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
171
171
  name: "coderwyd/disables/cli",
172
172
  rules: {
173
+ "antfu/no-top-level-await": "off",
173
174
  "no-console": "off"
174
175
  }
175
176
  },
@@ -195,6 +196,7 @@ function disables() {
195
196
  files: ["**/*.{test,spec}.([tj])s?(x)"],
196
197
  name: "coderwyd/disables/test",
197
198
  rules: {
199
+ "antfu/no-top-level-await": "off",
198
200
  "no-unused-expressions": "off"
199
201
  }
200
202
  },
@@ -550,6 +552,7 @@ function javascript(options = {}) {
550
552
  "error",
551
553
  { enforceForClassMembers: true, setWithoutGet: true }
552
554
  ],
555
+ "antfu/no-top-level-await": "error",
553
556
  "array-callback-return": "error",
554
557
  "block-scoped-var": "error",
555
558
  "constructor-super": "error",
@@ -1040,6 +1043,13 @@ async function react(options = {}) {
1040
1043
  allowConstantExport: isAllowConstantExport,
1041
1044
  allowExportNames: [
1042
1045
  ...isUsingNext ? [
1046
+ "dynamic",
1047
+ "dynamicParams",
1048
+ "revalidate",
1049
+ "fetchCache",
1050
+ "runtime",
1051
+ "preferredRegion",
1052
+ "maxDuration",
1043
1053
  "config",
1044
1054
  "generateStaticParams",
1045
1055
  "metadata",
@@ -1512,7 +1522,6 @@ async function test(options = {}) {
1512
1522
  "test/prefer-hooks-in-order": "error",
1513
1523
  "test/prefer-lowercase-title": "error",
1514
1524
  "ts/explicit-function-return-type": "off",
1515
- "unicorn/consistent-function-scoping": "off",
1516
1525
  ...overrides
1517
1526
  }
1518
1527
  }
@@ -1640,8 +1649,13 @@ async function typescript(options = {}) {
1640
1649
  "ts/no-import-type-side-effects": "error",
1641
1650
  "ts/no-invalid-void-type": "off",
1642
1651
  "ts/no-non-null-assertion": "off",
1643
- "ts/no-redeclare": "error",
1652
+ "ts/no-redeclare": ["error", { builtinGlobals: false }],
1644
1653
  "ts/no-require-imports": "error",
1654
+ "ts/no-unused-expressions": ["error", {
1655
+ allowShortCircuit: true,
1656
+ allowTaggedTemplates: true,
1657
+ allowTernary: true
1658
+ }],
1645
1659
  "ts/no-unused-vars": "off",
1646
1660
  "ts/no-use-before-define": [
1647
1661
  "error",
@@ -1680,7 +1694,6 @@ function unicorn() {
1680
1694
  // 'unicorn/better-regex': 'error',
1681
1695
  "unicorn/catch-error-name": "error",
1682
1696
  "unicorn/consistent-empty-array-spread": "error",
1683
- "unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
1684
1697
  "unicorn/custom-error-definition": "error",
1685
1698
  "unicorn/error-message": "error",
1686
1699
  // 'unicorn/explicit-length-check': 'error',
@@ -1850,7 +1863,9 @@ async function vue(options = {}) {
1850
1863
  rules: {
1851
1864
  ...pluginVue.configs.base.rules,
1852
1865
  ...vueRules,
1866
+ "antfu/no-top-level-await": "off",
1853
1867
  "node/prefer-global/process": "off",
1868
+ "ts/explicit-function-return-type": "off",
1854
1869
  "vue/block-order": [
1855
1870
  "error",
1856
1871
  {