@coderwyd/eslint-config 2.6.0 → 2.6.1

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/README.md CHANGED
@@ -71,16 +71,16 @@ Add the following settings to your `.vscode/settings.json`:
71
71
 
72
72
  // Silent the stylistic rules in you IDE, but still auto fix them
73
73
  "eslint.rules.customizations": [
74
- { "rule": "style/*", "severity": "off" },
75
- { "rule": "format/*", "severity": "off" },
76
- { "rule": "*-indent", "severity": "off" },
77
- { "rule": "*-spacing", "severity": "off" },
78
- { "rule": "*-spaces", "severity": "off" },
79
- { "rule": "*-order", "severity": "off" },
80
- { "rule": "*-dangle", "severity": "off" },
81
- { "rule": "*-newline", "severity": "off" },
82
- { "rule": "*quotes", "severity": "off" },
83
- { "rule": "*semi", "severity": "off" }
74
+ { "rule": "style/*", "severity": "off", "fixable": true },
75
+ { "rule": "format/*", "severity": "off", "fixable": true },
76
+ { "rule": "*-indent", "severity": "off", "fixable": true },
77
+ { "rule": "*-spacing", "severity": "off", "fixable": true },
78
+ { "rule": "*-spaces", "severity": "off", "fixable": true },
79
+ { "rule": "*-order", "severity": "off", "fixable": true },
80
+ { "rule": "*-dangle", "severity": "off", "fixable": true },
81
+ { "rule": "*-newline", "severity": "off", "fixable": true },
82
+ { "rule": "*quotes", "severity": "off", "fixable": true },
83
+ { "rule": "*semi", "severity": "off", "fixable": true }
84
84
  ],
85
85
 
86
86
  // Enable eslint for all supported languages
package/dist/cli.cjs CHANGED
@@ -46,23 +46,23 @@ 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.6.0";
49
+ var version = "2.6.1";
50
50
  var devDependencies = {
51
- "@antfu/ni": "^0.21.12",
52
- "@eslint-react/eslint-plugin": "^1.5.24",
53
- "@eslint/config-inspector": "^0.5.1",
51
+ "@antfu/ni": "^0.22.0",
52
+ "@eslint-react/eslint-plugin": "^1.5.30",
53
+ "@eslint/config-inspector": "^0.5.2",
54
54
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
55
- "@types/eslint": "^8.56.10",
55
+ "@types/eslint": "^8.56.11",
56
56
  "@types/fs-extra": "^11.0.4",
57
- "@types/node": "^20.14.10",
57
+ "@types/node": "^20.14.11",
58
58
  "@types/prompts": "^2.4.9",
59
59
  "@types/yargs": "^17.0.32",
60
- "@unocss/eslint-plugin": "^0.61.3",
60
+ "@unocss/eslint-plugin": "^0.61.5",
61
61
  bumpp: "^9.4.1",
62
- eslint: "^9.6.0",
62
+ eslint: "^9.7.0",
63
63
  "eslint-plugin-react-hooks": "^4.6.2",
64
- "eslint-plugin-react-refresh": "^0.4.8",
65
- "eslint-plugin-svelte": "2.41.0",
64
+ "eslint-plugin-react-refresh": "^0.4.9",
65
+ "eslint-plugin-svelte": "2.43.0",
66
66
  "eslint-plugin-tailwindcss": "^3.17.4",
67
67
  execa: "^9.3.0",
68
68
  "fast-glob": "^3.3.2",
@@ -71,10 +71,10 @@ var devDependencies = {
71
71
  rimraf: "^6.0.1",
72
72
  "simple-git-hooks": "^2.11.1",
73
73
  svelte: "^4.2.18",
74
- "svelte-eslint-parser": "^0.40.0",
75
- tsup: "^8.1.0",
74
+ "svelte-eslint-parser": "^0.41.0",
75
+ tsup: "^8.2.2",
76
76
  tsx: "^4.16.2",
77
- typescript: "^5.5.3"
77
+ typescript: "^5.5.4"
78
78
  };
79
79
 
80
80
  // src/cli/constants.ts
@@ -96,16 +96,16 @@ var vscodeSettingsString = `
96
96
 
97
97
  // Silent the stylistic rules in you IDE, but still auto fix them
98
98
  "eslint.rules.customizations": [
99
- { "rule": "style/*", "severity": "off" },
100
- { "rule": "format/*", "severity": "off" },
101
- { "rule": "*-indent", "severity": "off" },
102
- { "rule": "*-spacing", "severity": "off" },
103
- { "rule": "*-spaces", "severity": "off" },
104
- { "rule": "*-order", "severity": "off" },
105
- { "rule": "*-dangle", "severity": "off" },
106
- { "rule": "*-newline", "severity": "off" },
107
- { "rule": "*quotes", "severity": "off" },
108
- { "rule": "*semi", "severity": "off" }
99
+ { "rule": "style/*", "severity": "off", "fixable": true },
100
+ { "rule": "format/*", "severity": "off", "fixable": true },
101
+ { "rule": "*-indent", "severity": "off", "fixable": true },
102
+ { "rule": "*-spacing", "severity": "off", "fixable": true },
103
+ { "rule": "*-spaces", "severity": "off", "fixable": true },
104
+ { "rule": "*-order", "severity": "off", "fixable": true },
105
+ { "rule": "*-dangle", "severity": "off", "fixable": true },
106
+ { "rule": "*-newline", "severity": "off", "fixable": true },
107
+ { "rule": "*quotes", "severity": "off", "fixable": true },
108
+ { "rule": "*semi", "severity": "off", "fixable": true }
109
109
  ],
110
110
 
111
111
  // Enable eslint for all supported languages
package/dist/cli.js CHANGED
@@ -17,23 +17,23 @@ import parse from "parse-gitignore";
17
17
  import c from "picocolors";
18
18
 
19
19
  // package.json
20
- var version = "2.6.0";
20
+ var version = "2.6.1";
21
21
  var devDependencies = {
22
- "@antfu/ni": "^0.21.12",
23
- "@eslint-react/eslint-plugin": "^1.5.24",
24
- "@eslint/config-inspector": "^0.5.1",
22
+ "@antfu/ni": "^0.22.0",
23
+ "@eslint-react/eslint-plugin": "^1.5.30",
24
+ "@eslint/config-inspector": "^0.5.2",
25
25
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
26
- "@types/eslint": "^8.56.10",
26
+ "@types/eslint": "^8.56.11",
27
27
  "@types/fs-extra": "^11.0.4",
28
- "@types/node": "^20.14.10",
28
+ "@types/node": "^20.14.11",
29
29
  "@types/prompts": "^2.4.9",
30
30
  "@types/yargs": "^17.0.32",
31
- "@unocss/eslint-plugin": "^0.61.3",
31
+ "@unocss/eslint-plugin": "^0.61.5",
32
32
  bumpp: "^9.4.1",
33
- eslint: "^9.6.0",
33
+ eslint: "^9.7.0",
34
34
  "eslint-plugin-react-hooks": "^4.6.2",
35
- "eslint-plugin-react-refresh": "^0.4.8",
36
- "eslint-plugin-svelte": "2.41.0",
35
+ "eslint-plugin-react-refresh": "^0.4.9",
36
+ "eslint-plugin-svelte": "2.43.0",
37
37
  "eslint-plugin-tailwindcss": "^3.17.4",
38
38
  execa: "^9.3.0",
39
39
  "fast-glob": "^3.3.2",
@@ -42,10 +42,10 @@ var devDependencies = {
42
42
  rimraf: "^6.0.1",
43
43
  "simple-git-hooks": "^2.11.1",
44
44
  svelte: "^4.2.18",
45
- "svelte-eslint-parser": "^0.40.0",
46
- tsup: "^8.1.0",
45
+ "svelte-eslint-parser": "^0.41.0",
46
+ tsup: "^8.2.2",
47
47
  tsx: "^4.16.2",
48
- typescript: "^5.5.3"
48
+ typescript: "^5.5.4"
49
49
  };
50
50
 
51
51
  // src/cli/constants.ts
@@ -67,16 +67,16 @@ var vscodeSettingsString = `
67
67
 
68
68
  // Silent the stylistic rules in you IDE, but still auto fix them
69
69
  "eslint.rules.customizations": [
70
- { "rule": "style/*", "severity": "off" },
71
- { "rule": "format/*", "severity": "off" },
72
- { "rule": "*-indent", "severity": "off" },
73
- { "rule": "*-spacing", "severity": "off" },
74
- { "rule": "*-spaces", "severity": "off" },
75
- { "rule": "*-order", "severity": "off" },
76
- { "rule": "*-dangle", "severity": "off" },
77
- { "rule": "*-newline", "severity": "off" },
78
- { "rule": "*quotes", "severity": "off" },
79
- { "rule": "*semi", "severity": "off" }
70
+ { "rule": "style/*", "severity": "off", "fixable": true },
71
+ { "rule": "format/*", "severity": "off", "fixable": true },
72
+ { "rule": "*-indent", "severity": "off", "fixable": true },
73
+ { "rule": "*-spacing", "severity": "off", "fixable": true },
74
+ { "rule": "*-spaces", "severity": "off", "fixable": true },
75
+ { "rule": "*-order", "severity": "off", "fixable": true },
76
+ { "rule": "*-dangle", "severity": "off", "fixable": true },
77
+ { "rule": "*-newline", "severity": "off", "fixable": true },
78
+ { "rule": "*quotes", "severity": "off", "fixable": true },
79
+ { "rule": "*semi", "severity": "off", "fixable": true }
80
80
  ],
81
81
 
82
82
  // Enable eslint for all supported languages
package/dist/index.cjs CHANGED
@@ -44,7 +44,6 @@ __export(src_exports, {
44
44
  toArray: () => toArray
45
45
  });
46
46
  module.exports = __toCommonJS(src_exports);
47
- var import_node_fs = __toESM(require("fs"), 1);
48
47
 
49
48
  // src/plugins/index.ts
50
49
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
@@ -120,6 +119,7 @@ var GLOB_EXCLUDE = [
120
119
  "**/.vitepress/cache",
121
120
  "**/.nuxt",
122
121
  "**/.next",
122
+ "**/.svelte-kit",
123
123
  "**/.vercel",
124
124
  "**/.changeset",
125
125
  "**/.idea",
@@ -899,6 +899,7 @@ function sortTsconfig() {
899
899
  "allowSyntheticDefaultImports",
900
900
  "esModuleInterop",
901
901
  "forceConsistentCasingInFileNames",
902
+ "isolatedDeclarations",
902
903
  "isolatedModules",
903
904
  "preserveSymlinks",
904
905
  "verbatimModuleSyntax",
@@ -976,7 +977,7 @@ async function typescript(options = {}) {
976
977
  `${GLOB_MARKDOWN}/**`,
977
978
  GLOB_ASTRO_TS
978
979
  ];
979
- const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
980
+ const tsconfigPath = options.tsconfigPath;
980
981
  const isTypeAware = !!tsconfigPath;
981
982
  const typeAwareRules = {
982
983
  "dot-notation": "off",
@@ -1059,7 +1060,7 @@ async function typescript(options = {}) {
1059
1060
  "no-useless-constructor": "off",
1060
1061
  "ts/ban-ts-comment": [
1061
1062
  "error",
1062
- { "ts-ignore": "allow-with-description" }
1063
+ { "ts-expect-error": "allow-with-description" }
1063
1064
  ],
1064
1065
  "ts/consistent-type-definitions": ["error", "interface"],
1065
1066
  "ts/consistent-type-imports": [
@@ -1070,7 +1071,15 @@ async function typescript(options = {}) {
1070
1071
  // https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
1071
1072
  "ts/no-dupe-class-members": "error",
1072
1073
  "ts/no-dynamic-delete": "off",
1073
- "ts/no-empty-object-type": ["error", { allowInterfaces: "always" }],
1074
+ "ts/no-empty-object-type": [
1075
+ "error",
1076
+ {
1077
+ allowInterfaces: "with-single-extends",
1078
+ // interface Derived extends Base {}
1079
+ allowObjectTypes: "never",
1080
+ allowWithName: "Props$"
1081
+ }
1082
+ ],
1074
1083
  "ts/no-explicit-any": "off",
1075
1084
  "ts/no-extraneous-class": "off",
1076
1085
  "ts/no-import-type-side-effects": "error",
@@ -1086,7 +1095,6 @@ async function typescript(options = {}) {
1086
1095
  ],
1087
1096
  "ts/no-useless-constructor": "off",
1088
1097
  "ts/no-wrapper-object-types": "error",
1089
- "ts/prefer-ts-expect-error": "error",
1090
1098
  "ts/triple-slash-reference": "off",
1091
1099
  "ts/unified-signatures": "off",
1092
1100
  ...overrides
@@ -1471,6 +1479,7 @@ async function test(options = {}) {
1471
1479
  "test/no-only-tests": isInEditor2 ? "off" : "error",
1472
1480
  "test/prefer-hooks-in-order": "error",
1473
1481
  "test/prefer-lowercase-title": "error",
1482
+ "ts/explicit-function-return-type": "off",
1474
1483
  ...overrides
1475
1484
  }
1476
1485
  }
@@ -1833,7 +1842,6 @@ async function svelte(options = {}) {
1833
1842
  "svelte/no-useless-mustaches": "error",
1834
1843
  "svelte/require-store-callbacks-use-set-param": "error",
1835
1844
  "svelte/system": "error",
1836
- "svelte/valid-compile": "error",
1837
1845
  "svelte/valid-each-key": "error",
1838
1846
  "unused-imports/no-unused-vars": [
1839
1847
  "error",
@@ -2003,13 +2011,7 @@ async function defineConfig(options = {}, ...userConfigs) {
2003
2011
  ])
2004
2012
  );
2005
2013
  } else {
2006
- if (import_node_fs.default.existsSync(".gitignore")) {
2007
- configs2.push(
2008
- interopDefault(import("eslint-config-flat-gitignore")).then((r) => [
2009
- r()
2010
- ])
2011
- );
2012
- }
2014
+ configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({ strict: false })]));
2013
2015
  }
2014
2016
  }
2015
2017
  const typescriptOptions = resolveSubOptions(options, "typescript");