@coderwyd/eslint-config 2.5.6 → 2.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
@@ -46,34 +46,34 @@ var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
46
46
  var import_picocolors = __toESM(require("picocolors"), 1);
47
47
 
48
48
  // package.json
49
- var version = "2.5.6";
49
+ var version = "2.6.0";
50
50
  var devDependencies = {
51
51
  "@antfu/ni": "^0.21.12",
52
- "@eslint-react/eslint-plugin": "^1.5.20",
52
+ "@eslint-react/eslint-plugin": "^1.5.24",
53
53
  "@eslint/config-inspector": "^0.5.1",
54
54
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
55
55
  "@types/eslint": "^8.56.10",
56
56
  "@types/fs-extra": "^11.0.4",
57
- "@types/node": "^20.14.9",
57
+ "@types/node": "^20.14.10",
58
58
  "@types/prompts": "^2.4.9",
59
59
  "@types/yargs": "^17.0.32",
60
- "@unocss/eslint-plugin": "^0.61.0",
60
+ "@unocss/eslint-plugin": "^0.61.3",
61
61
  bumpp: "^9.4.1",
62
62
  eslint: "^9.6.0",
63
63
  "eslint-plugin-react-hooks": "^4.6.2",
64
- "eslint-plugin-react-refresh": "^0.4.7",
65
- "eslint-plugin-svelte": "2.39.5",
64
+ "eslint-plugin-react-refresh": "^0.4.8",
65
+ "eslint-plugin-svelte": "2.41.0",
66
66
  "eslint-plugin-tailwindcss": "^3.17.4",
67
67
  execa: "^9.3.0",
68
68
  "fast-glob": "^3.3.2",
69
69
  "fs-extra": "^11.2.0",
70
70
  "lint-staged": "^15.2.7",
71
- rimraf: "^5.0.7",
71
+ rimraf: "^6.0.1",
72
72
  "simple-git-hooks": "^2.11.1",
73
73
  svelte: "^4.2.18",
74
- "svelte-eslint-parser": "^0.39.2",
74
+ "svelte-eslint-parser": "^0.40.0",
75
75
  tsup: "^8.1.0",
76
- tsx: "^4.16.0",
76
+ tsx: "^4.16.2",
77
77
  typescript: "^5.5.3"
78
78
  };
79
79
 
package/dist/cli.js CHANGED
@@ -17,34 +17,34 @@ import parse from "parse-gitignore";
17
17
  import c from "picocolors";
18
18
 
19
19
  // package.json
20
- var version = "2.5.6";
20
+ var version = "2.6.0";
21
21
  var devDependencies = {
22
22
  "@antfu/ni": "^0.21.12",
23
- "@eslint-react/eslint-plugin": "^1.5.20",
23
+ "@eslint-react/eslint-plugin": "^1.5.24",
24
24
  "@eslint/config-inspector": "^0.5.1",
25
25
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
26
26
  "@types/eslint": "^8.56.10",
27
27
  "@types/fs-extra": "^11.0.4",
28
- "@types/node": "^20.14.9",
28
+ "@types/node": "^20.14.10",
29
29
  "@types/prompts": "^2.4.9",
30
30
  "@types/yargs": "^17.0.32",
31
- "@unocss/eslint-plugin": "^0.61.0",
31
+ "@unocss/eslint-plugin": "^0.61.3",
32
32
  bumpp: "^9.4.1",
33
33
  eslint: "^9.6.0",
34
34
  "eslint-plugin-react-hooks": "^4.6.2",
35
- "eslint-plugin-react-refresh": "^0.4.7",
36
- "eslint-plugin-svelte": "2.39.5",
35
+ "eslint-plugin-react-refresh": "^0.4.8",
36
+ "eslint-plugin-svelte": "2.41.0",
37
37
  "eslint-plugin-tailwindcss": "^3.17.4",
38
38
  execa: "^9.3.0",
39
39
  "fast-glob": "^3.3.2",
40
40
  "fs-extra": "^11.2.0",
41
41
  "lint-staged": "^15.2.7",
42
- rimraf: "^5.0.7",
42
+ rimraf: "^6.0.1",
43
43
  "simple-git-hooks": "^2.11.1",
44
44
  svelte: "^4.2.18",
45
- "svelte-eslint-parser": "^0.39.2",
45
+ "svelte-eslint-parser": "^0.40.0",
46
46
  tsup: "^8.1.0",
47
- tsx: "^4.16.0",
47
+ tsx: "^4.16.2",
48
48
  typescript: "^5.5.3"
49
49
  };
50
50
 
package/dist/index.cjs CHANGED
@@ -76,7 +76,6 @@ async function comments() {
76
76
  // src/constants/glob.ts
77
77
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
78
78
  var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
79
- var GLOB_JS = "**/*.?([cm])js";
80
79
  var GLOB_JSX = "**/*.?([cm])jsx";
81
80
  var GLOB_TS = "**/*.?([cm])ts";
82
81
  var GLOB_DTS = "**/*.d.?([cm])ts";
@@ -982,14 +981,12 @@ async function typescript(options = {}) {
982
981
  const typeAwareRules = {
983
982
  "dot-notation": "off",
984
983
  "no-implied-eval": "off",
985
- "no-throw-literal": "off",
986
984
  "ts/await-thenable": "error",
987
985
  "ts/dot-notation": ["error", { allowKeywords: true }],
988
986
  "ts/no-floating-promises": "error",
989
987
  "ts/no-for-in-array": "error",
990
988
  "ts/no-implied-eval": "error",
991
989
  "ts/no-misused-promises": "error",
992
- "ts/no-throw-literal": "error",
993
990
  "ts/no-unnecessary-type-assertion": "error",
994
991
  "ts/no-unsafe-argument": "error",
995
992
  "ts/no-unsafe-assignment": "error",
@@ -1018,7 +1015,10 @@ async function typescript(options = {}) {
1018
1015
  extraFileExtensions: componentExts.map((ext) => `.${ext}`),
1019
1016
  sourceType: "module",
1020
1017
  ...typeAware ? {
1021
- project: tsconfigPath,
1018
+ projectService: {
1019
+ allowDefaultProject: ["./*.js"],
1020
+ defaultProject: tsconfigPath
1021
+ },
1022
1022
  tsconfigRootDir: import_node_process2.default.cwd()
1023
1023
  } : {},
1024
1024
  ...parserOptions
@@ -1061,7 +1061,6 @@ async function typescript(options = {}) {
1061
1061
  "error",
1062
1062
  { "ts-ignore": "allow-with-description" }
1063
1063
  ],
1064
- "ts/ban-types": ["error", { types: { Function: false } }],
1065
1064
  "ts/consistent-type-definitions": ["error", "interface"],
1066
1065
  "ts/consistent-type-imports": [
1067
1066
  "error",
@@ -1071,6 +1070,7 @@ async function typescript(options = {}) {
1071
1070
  // https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
1072
1071
  "ts/no-dupe-class-members": "error",
1073
1072
  "ts/no-dynamic-delete": "off",
1073
+ "ts/no-empty-object-type": ["error", { allowInterfaces: "always" }],
1074
1074
  "ts/no-explicit-any": "off",
1075
1075
  "ts/no-extraneous-class": "off",
1076
1076
  "ts/no-import-type-side-effects": "error",
@@ -1085,6 +1085,7 @@ async function typescript(options = {}) {
1085
1085
  { classes: false, functions: false, variables: true }
1086
1086
  ],
1087
1087
  "ts/no-useless-constructor": "off",
1088
+ "ts/no-wrapper-object-types": "error",
1088
1089
  "ts/prefer-ts-expect-error": "error",
1089
1090
  "ts/triple-slash-reference": "off",
1090
1091
  "ts/unified-signatures": "off",
@@ -1519,7 +1520,7 @@ function hasPackages(packages) {
1519
1520
  // src/configs/react.ts
1520
1521
  var ReactRefreshAllowConstantExportPackages = ["vite"];
1521
1522
  async function react(options = {}) {
1522
- const { files = [GLOB_JS, GLOB_JSX, GLOB_TS, GLOB_TSX], overrides = {} } = options;
1523
+ const { files = [GLOB_SRC], overrides = {} } = options;
1523
1524
  await ensurePackages([
1524
1525
  "@eslint-react/eslint-plugin",
1525
1526
  "eslint-plugin-react-hooks",