@dhzh/eslint-config 1.24.1 → 1.25.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/README.md CHANGED
@@ -8,11 +8,11 @@ I use ESLint to format and lint my code:
8
8
  |---|---|---|
9
9
  | [react](./src/configs/react.ts) | [`ESLint React`](https://eslint-react.xyz/) [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) [`eslint-plugin-react-refresh`](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) [`eslint-plugin-react-compiler`](https://www.npmjs.com/package/eslint-plugin-react-compiler) [`eslint-plugin-react-google-translate`](https://www.npmjs.com/package/eslint-plugin-react-google-translate) |
10
10
  | [vue](./src/configs/vue.ts) | [`eslint-plugin-vue`](https://eslint.vuejs.org/) [`vue-eslint-parser`](https://www.npmjs.com/package/vue-eslint-parser) [`eslint-processor-vue-blocks`](https://github.com/antfu/eslint-processor-vue-blocks) |
11
- | [stylistic](./src/configs/stylistic.ts) | [`ESLint Stylistic`](https://eslint.style/) [`eslint-plugin-antfu`](https://github.com/antfu/eslint-plugin-antfu) [`eslint-plugin-hyoban`](https://github.com/hyoban/eslint-plugin-hyoban) |
11
+ | [stylistic](./src/configs/stylistic.ts) | [`ESLint Stylistic`](https://eslint.style/) [`eslint-plugin-antfu`](https://github.com/antfu/eslint-plugin-antfu) |
12
12
  | [typescript](./src/configs/typescript.ts) | [`typescript-eslint`](https://typescript-eslint.io/) |
13
13
  | [javascript](./src/configs/javascript.ts) | [`@eslint/js`](https://eslint.org/docs/latest/rules) |
14
14
  | [node](./src/configs/node.ts) | [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) |
15
- | [json](./src/configs/json.ts) | [`eslint-plugin-jsonc`](https://ota-meshi.github.io/eslint-plugin-jsonc/) [`eslint-plugin-package-json`](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json) [`jsonc-eslint-parser`](https://github.com/ota-meshi/jsonc-eslint-parser) |
15
+ | [json](./src/configs/json.ts) | [`eslint-plugin-jsonc`](https://ota-meshi.github.io/eslint-plugin-jsonc/) [`eslint-plugin-package-json`](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json) |
16
16
  | [unicorn](./src/configs/unicorn.ts) | [`eslint-plugin-unicorn`](https://www.npmjs.com/package/eslint-plugin-unicorn) |
17
17
  | [imports](./src/configs/imports.ts) | [`eslint-plugin-import-x`](https://www.npmjs.com/package/eslint-plugin-import-x) [`eslint-plugin-unused-imports`](https://github.com/sweepline/eslint-plugin-unused-imports) [`eslint-plugin-simple-import-sort`](https://github.com/lydell/eslint-plugin-simple-import-sort) |
18
18
  | [formatters](./src/configs/formatters.ts) | [`eslint-plugin-format`](https://github.com/antfu/eslint-plugin-format) [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml) | html/css/graphql/xml/svg |
@@ -28,13 +28,13 @@ var import_ansis6 = __toESM(require("ansis"), 1);
28
28
  var import_cac = require("cac");
29
29
 
30
30
  // package.json
31
- var version = "1.24.1";
31
+ var version = "1.25.0";
32
32
  var package_default = {
33
33
  name: "@dhzh/eslint-config",
34
34
  type: "module",
35
35
  version,
36
- packageManager: "pnpm@10.28.2",
37
- description: "Lyle's ESLint config",
36
+ packageManager: "pnpm@10.30.3",
37
+ description: "tinywaves's ESLint config",
38
38
  author: {
39
39
  name: "Lyle Zheng",
40
40
  email: "dhzhme@gmail.com"
@@ -67,7 +67,7 @@ var package_default = {
67
67
  "dist"
68
68
  ],
69
69
  engines: {
70
- node: "^18.18.0 || ^20.9.0 || >=21.1.0"
70
+ node: "^22.13.0 || >=24"
71
71
  },
72
72
  scripts: {
73
73
  build: "pnpm run typegen && tsup --clean --dts",
@@ -82,8 +82,8 @@ var package_default = {
82
82
  typegen: "tsx scripts/eslint-typegen.ts"
83
83
  },
84
84
  peerDependencies: {
85
- "@prettier/plugin-xml": "^3.4.1",
86
- eslint: "^9.39.2"
85
+ "@prettier/plugin-xml": "^3.4.2",
86
+ eslint: "^10.0.3"
87
87
  },
88
88
  peerDependenciesMeta: {
89
89
  "@prettier/plugin-xml": {
@@ -91,54 +91,53 @@ var package_default = {
91
91
  }
92
92
  },
93
93
  dependencies: {
94
- "@clack/prompts": "^1.0.0",
95
- "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
96
- "@eslint-react/eslint-plugin": "^2.8.1",
97
- "@eslint/js": "^9.39.2",
98
- "@stylistic/eslint-plugin": "^5.7.1",
99
- "@unocss/eslint-config": "66.6.0",
94
+ "@clack/prompts": "^1.1.0",
95
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
96
+ "@eslint-react/eslint-plugin": "^2.13.0",
97
+ "@eslint/js": "^10.0.1",
98
+ "@stylistic/eslint-plugin": "^5.10.0",
99
+ "@unocss/eslint-config": "66.6.6",
100
100
  ansis: "^4.2.0",
101
- cac: "^6.7.14",
101
+ cac: "^7.0.0",
102
102
  "eslint-merge-processors": "^2.0.0",
103
- "eslint-plugin-antfu": "^3.1.3",
104
- "eslint-plugin-format": "^1.3.1",
105
- "eslint-plugin-hyoban": "^0.6.1",
103
+ "eslint-plugin-antfu": "^3.2.2",
104
+ "eslint-plugin-format": "^2.0.1",
106
105
  "eslint-plugin-import-x": "^4.16.1",
107
- "eslint-plugin-jsonc": "^2.21.0",
108
- "eslint-plugin-n": "^17.23.2",
109
- "eslint-plugin-package-json": "^0.88.2",
106
+ "eslint-plugin-jsonc": "^3.1.1",
107
+ "eslint-plugin-n": "^17.24.0",
108
+ "eslint-plugin-package-json": "^0.89.4",
110
109
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
111
110
  "eslint-plugin-react-google-translate": "^0.1.1",
112
111
  "eslint-plugin-react-hooks": "^7.0.1",
113
- "eslint-plugin-react-refresh": "^0.4.26",
112
+ "eslint-plugin-react-refresh": "^0.5.2",
114
113
  "eslint-plugin-regexp": "^3.0.0",
115
114
  "eslint-plugin-simple-import-sort": "^12.1.1",
116
115
  "eslint-plugin-tailwindcss": "4.0.0-beta.0",
117
- "eslint-plugin-toml": "^1.0.3",
118
- "eslint-plugin-unicorn": "^62.0.0",
119
- "eslint-plugin-unused-imports": "^4.3.0",
120
- "eslint-plugin-vue": "^10.7.0",
121
- "eslint-plugin-yml": "^3.0.0",
116
+ "eslint-plugin-toml": "^1.3.1",
117
+ "eslint-plugin-unicorn": "^63.0.0",
118
+ "eslint-plugin-unused-imports": "^4.4.1",
119
+ "eslint-plugin-vue": "^10.8.0",
120
+ "eslint-plugin-yml": "^3.3.1",
122
121
  "eslint-processor-vue-blocks": "^2.0.0",
123
- globals: "^17.2.0",
124
- "jsonc-eslint-parser": "^2.4.2",
122
+ globals: "^17.4.0",
125
123
  "local-pkg": "^1.1.2",
126
124
  "toml-eslint-parser": "^1.0.3",
127
- "typescript-eslint": "^8.54.0",
128
- "vue-eslint-parser": "^10.2.0"
125
+ "typescript-eslint": "^8.56.1",
126
+ "vue-eslint-parser": "^10.4.0"
129
127
  },
130
128
  devDependencies: {
131
- "@eslint/config-inspector": "^1.4.2",
129
+ "@eslint/config-inspector": "^1.5.0",
132
130
  "@prettier/plugin-xml": "^3.4.2",
133
131
  "@types/eslint-plugin-tailwindcss": "^3.17.0",
134
- "@types/node": "^22.19.7",
135
- bumpp: "^10.4.0",
132
+ "@types/node": "^24.12.0",
133
+ "@typescript-eslint/types": "^8.56.1",
134
+ bumpp: "^10.4.1",
136
135
  "bundle-require": "^5.1.0",
137
- eslint: "^9.39.2",
138
- "eslint-typegen": "^2.3.0",
139
- "lint-staged": "^16.2.7",
136
+ eslint: "^10.0.3",
137
+ "eslint-typegen": "^2.3.1",
138
+ "lint-staged": "^16.3.2",
140
139
  "simple-git-hooks": "^2.13.1",
141
- tailwindcss: "^4.1.18",
140
+ tailwindcss: "^4.2.1",
142
141
  tsup: "^8.5.1",
143
142
  tsx: "^4.21.0",
144
143
  typescript: "^5.9.3"
package/dist/cli/index.js CHANGED
@@ -4,13 +4,13 @@ import c5 from "ansis";
4
4
  import { cac } from "cac";
5
5
 
6
6
  // package.json
7
- var version = "1.24.1";
7
+ var version = "1.25.0";
8
8
  var package_default = {
9
9
  name: "@dhzh/eslint-config",
10
10
  type: "module",
11
11
  version,
12
- packageManager: "pnpm@10.28.2",
13
- description: "Lyle's ESLint config",
12
+ packageManager: "pnpm@10.30.3",
13
+ description: "tinywaves's ESLint config",
14
14
  author: {
15
15
  name: "Lyle Zheng",
16
16
  email: "dhzhme@gmail.com"
@@ -43,7 +43,7 @@ var package_default = {
43
43
  "dist"
44
44
  ],
45
45
  engines: {
46
- node: "^18.18.0 || ^20.9.0 || >=21.1.0"
46
+ node: "^22.13.0 || >=24"
47
47
  },
48
48
  scripts: {
49
49
  build: "pnpm run typegen && tsup --clean --dts",
@@ -58,8 +58,8 @@ var package_default = {
58
58
  typegen: "tsx scripts/eslint-typegen.ts"
59
59
  },
60
60
  peerDependencies: {
61
- "@prettier/plugin-xml": "^3.4.1",
62
- eslint: "^9.39.2"
61
+ "@prettier/plugin-xml": "^3.4.2",
62
+ eslint: "^10.0.3"
63
63
  },
64
64
  peerDependenciesMeta: {
65
65
  "@prettier/plugin-xml": {
@@ -67,54 +67,53 @@ var package_default = {
67
67
  }
68
68
  },
69
69
  dependencies: {
70
- "@clack/prompts": "^1.0.0",
71
- "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
72
- "@eslint-react/eslint-plugin": "^2.8.1",
73
- "@eslint/js": "^9.39.2",
74
- "@stylistic/eslint-plugin": "^5.7.1",
75
- "@unocss/eslint-config": "66.6.0",
70
+ "@clack/prompts": "^1.1.0",
71
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
72
+ "@eslint-react/eslint-plugin": "^2.13.0",
73
+ "@eslint/js": "^10.0.1",
74
+ "@stylistic/eslint-plugin": "^5.10.0",
75
+ "@unocss/eslint-config": "66.6.6",
76
76
  ansis: "^4.2.0",
77
- cac: "^6.7.14",
77
+ cac: "^7.0.0",
78
78
  "eslint-merge-processors": "^2.0.0",
79
- "eslint-plugin-antfu": "^3.1.3",
80
- "eslint-plugin-format": "^1.3.1",
81
- "eslint-plugin-hyoban": "^0.6.1",
79
+ "eslint-plugin-antfu": "^3.2.2",
80
+ "eslint-plugin-format": "^2.0.1",
82
81
  "eslint-plugin-import-x": "^4.16.1",
83
- "eslint-plugin-jsonc": "^2.21.0",
84
- "eslint-plugin-n": "^17.23.2",
85
- "eslint-plugin-package-json": "^0.88.2",
82
+ "eslint-plugin-jsonc": "^3.1.1",
83
+ "eslint-plugin-n": "^17.24.0",
84
+ "eslint-plugin-package-json": "^0.89.4",
86
85
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
87
86
  "eslint-plugin-react-google-translate": "^0.1.1",
88
87
  "eslint-plugin-react-hooks": "^7.0.1",
89
- "eslint-plugin-react-refresh": "^0.4.26",
88
+ "eslint-plugin-react-refresh": "^0.5.2",
90
89
  "eslint-plugin-regexp": "^3.0.0",
91
90
  "eslint-plugin-simple-import-sort": "^12.1.1",
92
91
  "eslint-plugin-tailwindcss": "4.0.0-beta.0",
93
- "eslint-plugin-toml": "^1.0.3",
94
- "eslint-plugin-unicorn": "^62.0.0",
95
- "eslint-plugin-unused-imports": "^4.3.0",
96
- "eslint-plugin-vue": "^10.7.0",
97
- "eslint-plugin-yml": "^3.0.0",
92
+ "eslint-plugin-toml": "^1.3.1",
93
+ "eslint-plugin-unicorn": "^63.0.0",
94
+ "eslint-plugin-unused-imports": "^4.4.1",
95
+ "eslint-plugin-vue": "^10.8.0",
96
+ "eslint-plugin-yml": "^3.3.1",
98
97
  "eslint-processor-vue-blocks": "^2.0.0",
99
- globals: "^17.2.0",
100
- "jsonc-eslint-parser": "^2.4.2",
98
+ globals: "^17.4.0",
101
99
  "local-pkg": "^1.1.2",
102
100
  "toml-eslint-parser": "^1.0.3",
103
- "typescript-eslint": "^8.54.0",
104
- "vue-eslint-parser": "^10.2.0"
101
+ "typescript-eslint": "^8.56.1",
102
+ "vue-eslint-parser": "^10.4.0"
105
103
  },
106
104
  devDependencies: {
107
- "@eslint/config-inspector": "^1.4.2",
105
+ "@eslint/config-inspector": "^1.5.0",
108
106
  "@prettier/plugin-xml": "^3.4.2",
109
107
  "@types/eslint-plugin-tailwindcss": "^3.17.0",
110
- "@types/node": "^22.19.7",
111
- bumpp: "^10.4.0",
108
+ "@types/node": "^24.12.0",
109
+ "@typescript-eslint/types": "^8.56.1",
110
+ bumpp: "^10.4.1",
112
111
  "bundle-require": "^5.1.0",
113
- eslint: "^9.39.2",
114
- "eslint-typegen": "^2.3.0",
115
- "lint-staged": "^16.2.7",
112
+ eslint: "^10.0.3",
113
+ "eslint-typegen": "^2.3.1",
114
+ "lint-staged": "^16.3.2",
116
115
  "simple-git-hooks": "^2.13.1",
117
- tailwindcss: "^4.1.18",
116
+ tailwindcss: "^4.2.1",
118
117
  tsup: "^8.5.1",
119
118
  tsx: "^4.21.0",
120
119
  typescript: "^5.9.3"
package/dist/index.cjs CHANGED
@@ -236,14 +236,6 @@ function react(options = {}) {
236
236
  enforceSetterName: true
237
237
  }
238
238
  ],
239
- "@eslint-react/naming-convention/filename-extension": [
240
- "warn",
241
- {
242
- allow: "as-needed",
243
- extensions: [".jsx", ".tsx"],
244
- ignoreFilesWithoutCode: true
245
- }
246
- ],
247
239
  "@eslint-react/naming-convention/context-name": "warn",
248
240
  ...language === "typescript" ? {
249
241
  "@eslint-react/no-leaked-conditional-rendering": "warn"
@@ -396,7 +388,6 @@ function vue(options = {}) {
396
388
  // src/configs/stylistic.ts
397
389
  var import_eslint_plugin2 = __toESM(require("@stylistic/eslint-plugin"), 1);
398
390
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
399
- var import_eslint_plugin_hyoban = __toESM(require("eslint-plugin-hyoban"), 1);
400
391
  function stylistic(options = {}) {
401
392
  const { overrides = {} } = options;
402
393
  const jsxIgnoreNodes = [
@@ -449,8 +440,7 @@ function stylistic(options = {}) {
449
440
  files: [...GLOB_SRC, ...GLOB_JSON_SRC, GLOB_VUE],
450
441
  plugins: {
451
442
  stylistic: import_eslint_plugin2.default,
452
- antfu: import_eslint_plugin_antfu.default,
453
- hyoban: import_eslint_plugin_hyoban.default
443
+ antfu: import_eslint_plugin_antfu.default
454
444
  },
455
445
  rules: {
456
446
  "curly": ["error", "all"],
@@ -563,7 +553,6 @@ function stylistic(options = {}) {
563
553
  "antfu/consistent-list-newline": "error",
564
554
  "antfu/top-level-function": "off",
565
555
  "antfu/curly": "off",
566
- "hyoban/prefer-early-return": "error",
567
556
  ...overrides
568
557
  }
569
558
  },
@@ -571,8 +560,7 @@ function stylistic(options = {}) {
571
560
  name: `${RULE_PREFIX}/stylistic/customize/jsx`,
572
561
  files: [...GLOB_JSX_SRC, GLOB_VUE],
573
562
  plugins: {
574
- stylistic: import_eslint_plugin2.default,
575
- hyoban: import_eslint_plugin_hyoban.default
563
+ stylistic: import_eslint_plugin2.default
576
564
  },
577
565
  rules: {
578
566
  "stylistic/indent": [
@@ -644,7 +632,6 @@ function stylistic(options = {}) {
644
632
  ],
645
633
  "stylistic/jsx-sort-props": "off",
646
634
  "stylistic/jsx-indent-props": "off",
647
- "hyoban/jsx-attribute-spacing": "error",
648
635
  ...overrides
649
636
  }
650
637
  }
@@ -1098,8 +1085,6 @@ function node(options = {}) {
1098
1085
  // src/configs/json.ts
1099
1086
  var import_eslint_plugin_jsonc = __toESM(require("eslint-plugin-jsonc"), 1);
1100
1087
  var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
1101
- var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
1102
- var import_eslint_plugin_hyoban2 = __toESM(require("eslint-plugin-hyoban"), 1);
1103
1088
  function json(options = {}) {
1104
1089
  const {
1105
1090
  overrides = { core: {}, packageJson: {} },
@@ -1107,34 +1092,24 @@ function json(options = {}) {
1107
1092
  packageJsonRequireType = true
1108
1093
  } = options;
1109
1094
  return [
1110
- ...import_eslint_plugin_jsonc.default.configs["flat/recommended-with-json"].map((item) => ({
1095
+ ...import_eslint_plugin_jsonc.default.configs["recommended-with-json"].map((item) => ({
1111
1096
  ...item,
1112
1097
  name: `${RULE_PREFIX}/json/shared/json`,
1113
1098
  files: [GLOB_JSON]
1114
1099
  })),
1115
- ...import_eslint_plugin_jsonc.default.configs["flat/recommended-with-jsonc"].map((item) => ({
1100
+ ...import_eslint_plugin_jsonc.default.configs["recommended-with-jsonc"].map((item) => ({
1116
1101
  ...item,
1117
1102
  name: `${RULE_PREFIX}/json/shared/jsonc`,
1118
1103
  files: [GLOB_JSONC]
1119
1104
  })),
1120
- ...import_eslint_plugin_jsonc.default.configs["flat/recommended-with-json5"].map((item) => ({
1105
+ ...import_eslint_plugin_jsonc.default.configs["recommended-with-json5"].map((item) => ({
1121
1106
  ...item,
1122
1107
  name: `${RULE_PREFIX}/json/shared/json5`,
1123
1108
  files: [GLOB_JSON5]
1124
1109
  })),
1125
- {
1126
- name: `${RULE_PREFIX}/json/shared`,
1127
- files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
1128
- languageOptions: {
1129
- parser: import_jsonc_eslint_parser.default
1130
- }
1131
- },
1132
1110
  {
1133
1111
  name: `${RULE_PREFIX}/json/customize`,
1134
1112
  files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
1135
- plugins: {
1136
- hyoban: import_eslint_plugin_hyoban2.default
1137
- },
1138
1113
  rules: {
1139
1114
  "jsonc/array-bracket-spacing": ["error", "never"],
1140
1115
  "jsonc/comma-dangle": ["error", "never"],
@@ -1190,7 +1165,6 @@ function json(options = {}) {
1190
1165
  "jsonc/space-unary-ops": "error",
1191
1166
  "jsonc/valid-json-number": "error",
1192
1167
  "jsonc/vue-custom-block/no-parsing-error": "error",
1193
- "hyoban/jsonc-inline-spacing": "error",
1194
1168
  ...overrides.core
1195
1169
  }
1196
1170
  },