@dhzh/eslint-config 0.9.2 → 0.9.4

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
@@ -48,8 +48,8 @@ var import_picocolors = __toESM(require("picocolors"), 1);
48
48
  var package_default = {
49
49
  name: "@dhzh/eslint-config",
50
50
  type: "module",
51
- version: "0.9.2",
52
- packageManager: "pnpm@9.3.0",
51
+ version: "0.9.4",
52
+ packageManager: "pnpm@9.4.0",
53
53
  description: "Easton's ESLint config",
54
54
  author: "Easton Zheng <dhzhme@gmail.com>",
55
55
  license: "MIT",
@@ -133,18 +133,18 @@ var package_default = {
133
133
  dependencies: {
134
134
  "@antfu/install-pkg": "^0.3.3",
135
135
  "@clack/prompts": "^0.7.0",
136
- "@eslint-react/eslint-plugin": "^1.5.15",
137
- "@stylistic/eslint-plugin": "^2.1.0",
138
- "@typescript-eslint/eslint-plugin": "^7.13.0",
139
- "@typescript-eslint/parser": "^7.13.0",
136
+ "@eslint-react/eslint-plugin": "^1.5.22",
137
+ "@stylistic/eslint-plugin": "^2.3.0",
138
+ "@typescript-eslint/eslint-plugin": "^7.15.0",
139
+ "@typescript-eslint/parser": "^7.15.0",
140
140
  "eslint-config-flat-gitignore": "^0.1.5",
141
141
  "eslint-flat-config-utils": "^0.2.5",
142
142
  "eslint-merge-processors": "^0.1.0",
143
- "eslint-plugin-antfu": "^2.3.3",
143
+ "eslint-plugin-antfu": "^2.3.4",
144
144
  "eslint-plugin-command": "^0.2.3",
145
145
  "eslint-plugin-eslint-comments": "^3.2.0",
146
- "eslint-plugin-import-x": "^0.5.1",
147
- "eslint-plugin-jsdoc": "^48.2.12",
146
+ "eslint-plugin-import-x": "^0.5.3",
147
+ "eslint-plugin-jsdoc": "^48.5.2",
148
148
  "eslint-plugin-jsonc": "^2.16.0",
149
149
  "eslint-plugin-markdown": "^5.0.0",
150
150
  "eslint-plugin-n": "^17.9.0",
@@ -153,19 +153,19 @@ var package_default = {
153
153
  "eslint-plugin-react-hooks": "^4.6.2",
154
154
  "eslint-plugin-react-refresh": "^0.4.7",
155
155
  "eslint-plugin-regexp": "^2.6.0",
156
- "eslint-plugin-toml": "^0.11.0",
156
+ "eslint-plugin-toml": "^0.11.1",
157
157
  "eslint-plugin-unicorn": "^54.0.0",
158
158
  "eslint-plugin-unused-imports": "^3.2.0",
159
159
  "eslint-plugin-vitest": "^0.5.4",
160
- "eslint-plugin-vue": "^9.26.0",
160
+ "eslint-plugin-vue": "^9.27.0",
161
161
  "eslint-plugin-yml": "^1.14.0",
162
162
  "eslint-processor-vue-blocks": "^0.1.2",
163
- globals: "^15.4.0",
163
+ globals: "^15.8.0",
164
164
  "jsonc-eslint-parser": "^2.4.0",
165
165
  "local-pkg": "^0.5.0",
166
166
  "parse-gitignore": "^2.0.0",
167
167
  picocolors: "^1.0.1",
168
- "toml-eslint-parser": "^0.9.3",
168
+ "toml-eslint-parser": "^0.10.0",
169
169
  "vue-eslint-parser": "^9.4.3",
170
170
  "yaml-eslint-parser": "^1.2.3",
171
171
  yargs: "^17.7.2"
@@ -173,27 +173,27 @@ var package_default = {
173
173
  devDependencies: {
174
174
  "@antfu/ni": "^0.21.12",
175
175
  "@dhzh/eslint-config": "workspace:*",
176
- "@eslint/config-inspector": "^0.4.11",
176
+ "@eslint/config-inspector": "^0.5.1",
177
177
  "@prettier/plugin-xml": "^3.4.1",
178
- "@stylistic/eslint-plugin-migrate": "^2.1.0",
178
+ "@stylistic/eslint-plugin-migrate": "^2.3.0",
179
179
  "@types/eslint": "^8.56.10",
180
180
  "@types/fs-extra": "^11.0.4",
181
- "@types/node": "^20.14.2",
181
+ "@types/node": "^20.14.10",
182
182
  "@types/prompts": "^2.4.9",
183
183
  "@types/yargs": "^17.0.32",
184
- "@unocss/eslint-plugin": "^0.61.0",
184
+ "@unocss/eslint-plugin": "^0.61.2",
185
185
  "astro-eslint-parser": "^1.0.2",
186
186
  bumpp: "^9.4.1",
187
187
  "bundle-require": "^5.0.0",
188
- eslint: "npm:eslint-ts-patch@9.4.0-0",
188
+ eslint: "npm:eslint-ts-patch@9.5.0-0",
189
189
  "eslint-plugin-astro": "^1.2.2",
190
190
  "eslint-plugin-format": "^0.1.2",
191
- "eslint-plugin-solid": "^0.14.0",
192
- "eslint-plugin-svelte": "^2.39.3",
193
- "eslint-ts-patch": "9.4.0-0",
191
+ "eslint-plugin-solid": "^0.14.1",
192
+ "eslint-plugin-svelte": "^2.41.0",
193
+ "eslint-ts-patch": "9.5.0-0",
194
194
  "eslint-typegen": "^0.2.4",
195
195
  esno: "^4.7.0",
196
- execa: "^9.2.0",
196
+ execa: "^9.3.0",
197
197
  "fast-glob": "^3.3.2",
198
198
  "fs-extra": "^11.2.0",
199
199
  "lint-staged": "^15.2.7",
@@ -202,12 +202,15 @@ var package_default = {
202
202
  rimraf: "^5.0.7",
203
203
  "simple-git-hooks": "^2.11.1",
204
204
  svelte: "^4.2.18",
205
- "svelte-eslint-parser": "^0.37.0",
205
+ "svelte-eslint-parser": "^0.39.2",
206
206
  tsup: "^8.1.0",
207
- tsx: "^4.15.5",
208
- typescript: "^5.4.5",
207
+ tsx: "^4.16.2",
208
+ typescript: "^5.5.3",
209
209
  vitest: "^1.6.0",
210
- vue: "^3.4.29"
210
+ vue: "^3.4.31"
211
+ },
212
+ resolutions: {
213
+ tsx: "~4.16.2"
211
214
  },
212
215
  "simple-git-hooks": {
213
216
  "pre-commit": "npx lint-staged"
@@ -224,10 +227,6 @@ var vscodeSettingsString = `
224
227
  "eslint.ignoreUntitled": true,
225
228
  "eslint.enable": true,
226
229
 
227
- // Enable the ESlint flat config support
228
- // (remove this if your ESLint extension above v3.0.5)
229
- "eslint.experimental.useFlatConfig": true,
230
-
231
230
  // Disable the default formatter, use eslint instead
232
231
  "prettier.enable": false,
233
232
  "editor.formatOnSave": false,
package/dist/cli.js CHANGED
@@ -19,8 +19,8 @@ import c from "picocolors";
19
19
  var package_default = {
20
20
  name: "@dhzh/eslint-config",
21
21
  type: "module",
22
- version: "0.9.2",
23
- packageManager: "pnpm@9.3.0",
22
+ version: "0.9.4",
23
+ packageManager: "pnpm@9.4.0",
24
24
  description: "Easton's ESLint config",
25
25
  author: "Easton Zheng <dhzhme@gmail.com>",
26
26
  license: "MIT",
@@ -104,18 +104,18 @@ var package_default = {
104
104
  dependencies: {
105
105
  "@antfu/install-pkg": "^0.3.3",
106
106
  "@clack/prompts": "^0.7.0",
107
- "@eslint-react/eslint-plugin": "^1.5.15",
108
- "@stylistic/eslint-plugin": "^2.1.0",
109
- "@typescript-eslint/eslint-plugin": "^7.13.0",
110
- "@typescript-eslint/parser": "^7.13.0",
107
+ "@eslint-react/eslint-plugin": "^1.5.22",
108
+ "@stylistic/eslint-plugin": "^2.3.0",
109
+ "@typescript-eslint/eslint-plugin": "^7.15.0",
110
+ "@typescript-eslint/parser": "^7.15.0",
111
111
  "eslint-config-flat-gitignore": "^0.1.5",
112
112
  "eslint-flat-config-utils": "^0.2.5",
113
113
  "eslint-merge-processors": "^0.1.0",
114
- "eslint-plugin-antfu": "^2.3.3",
114
+ "eslint-plugin-antfu": "^2.3.4",
115
115
  "eslint-plugin-command": "^0.2.3",
116
116
  "eslint-plugin-eslint-comments": "^3.2.0",
117
- "eslint-plugin-import-x": "^0.5.1",
118
- "eslint-plugin-jsdoc": "^48.2.12",
117
+ "eslint-plugin-import-x": "^0.5.3",
118
+ "eslint-plugin-jsdoc": "^48.5.2",
119
119
  "eslint-plugin-jsonc": "^2.16.0",
120
120
  "eslint-plugin-markdown": "^5.0.0",
121
121
  "eslint-plugin-n": "^17.9.0",
@@ -124,19 +124,19 @@ var package_default = {
124
124
  "eslint-plugin-react-hooks": "^4.6.2",
125
125
  "eslint-plugin-react-refresh": "^0.4.7",
126
126
  "eslint-plugin-regexp": "^2.6.0",
127
- "eslint-plugin-toml": "^0.11.0",
127
+ "eslint-plugin-toml": "^0.11.1",
128
128
  "eslint-plugin-unicorn": "^54.0.0",
129
129
  "eslint-plugin-unused-imports": "^3.2.0",
130
130
  "eslint-plugin-vitest": "^0.5.4",
131
- "eslint-plugin-vue": "^9.26.0",
131
+ "eslint-plugin-vue": "^9.27.0",
132
132
  "eslint-plugin-yml": "^1.14.0",
133
133
  "eslint-processor-vue-blocks": "^0.1.2",
134
- globals: "^15.4.0",
134
+ globals: "^15.8.0",
135
135
  "jsonc-eslint-parser": "^2.4.0",
136
136
  "local-pkg": "^0.5.0",
137
137
  "parse-gitignore": "^2.0.0",
138
138
  picocolors: "^1.0.1",
139
- "toml-eslint-parser": "^0.9.3",
139
+ "toml-eslint-parser": "^0.10.0",
140
140
  "vue-eslint-parser": "^9.4.3",
141
141
  "yaml-eslint-parser": "^1.2.3",
142
142
  yargs: "^17.7.2"
@@ -144,27 +144,27 @@ var package_default = {
144
144
  devDependencies: {
145
145
  "@antfu/ni": "^0.21.12",
146
146
  "@dhzh/eslint-config": "workspace:*",
147
- "@eslint/config-inspector": "^0.4.11",
147
+ "@eslint/config-inspector": "^0.5.1",
148
148
  "@prettier/plugin-xml": "^3.4.1",
149
- "@stylistic/eslint-plugin-migrate": "^2.1.0",
149
+ "@stylistic/eslint-plugin-migrate": "^2.3.0",
150
150
  "@types/eslint": "^8.56.10",
151
151
  "@types/fs-extra": "^11.0.4",
152
- "@types/node": "^20.14.2",
152
+ "@types/node": "^20.14.10",
153
153
  "@types/prompts": "^2.4.9",
154
154
  "@types/yargs": "^17.0.32",
155
- "@unocss/eslint-plugin": "^0.61.0",
155
+ "@unocss/eslint-plugin": "^0.61.2",
156
156
  "astro-eslint-parser": "^1.0.2",
157
157
  bumpp: "^9.4.1",
158
158
  "bundle-require": "^5.0.0",
159
- eslint: "npm:eslint-ts-patch@9.4.0-0",
159
+ eslint: "npm:eslint-ts-patch@9.5.0-0",
160
160
  "eslint-plugin-astro": "^1.2.2",
161
161
  "eslint-plugin-format": "^0.1.2",
162
- "eslint-plugin-solid": "^0.14.0",
163
- "eslint-plugin-svelte": "^2.39.3",
164
- "eslint-ts-patch": "9.4.0-0",
162
+ "eslint-plugin-solid": "^0.14.1",
163
+ "eslint-plugin-svelte": "^2.41.0",
164
+ "eslint-ts-patch": "9.5.0-0",
165
165
  "eslint-typegen": "^0.2.4",
166
166
  esno: "^4.7.0",
167
- execa: "^9.2.0",
167
+ execa: "^9.3.0",
168
168
  "fast-glob": "^3.3.2",
169
169
  "fs-extra": "^11.2.0",
170
170
  "lint-staged": "^15.2.7",
@@ -173,12 +173,15 @@ var package_default = {
173
173
  rimraf: "^5.0.7",
174
174
  "simple-git-hooks": "^2.11.1",
175
175
  svelte: "^4.2.18",
176
- "svelte-eslint-parser": "^0.37.0",
176
+ "svelte-eslint-parser": "^0.39.2",
177
177
  tsup: "^8.1.0",
178
- tsx: "^4.15.5",
179
- typescript: "^5.4.5",
178
+ tsx: "^4.16.2",
179
+ typescript: "^5.5.3",
180
180
  vitest: "^1.6.0",
181
- vue: "^3.4.29"
181
+ vue: "^3.4.31"
182
+ },
183
+ resolutions: {
184
+ tsx: "~4.16.2"
182
185
  },
183
186
  "simple-git-hooks": {
184
187
  "pre-commit": "npx lint-staged"
@@ -195,10 +198,6 @@ var vscodeSettingsString = `
195
198
  "eslint.ignoreUntitled": true,
196
199
  "eslint.enable": true,
197
200
 
198
- // Enable the ESlint flat config support
199
- // (remove this if your ESLint extension above v3.0.5)
200
- "eslint.experimental.useFlatConfig": true,
201
-
202
201
  // Disable the default formatter, use eslint instead
203
202
  "prettier.enable": false,
204
203
  "editor.formatOnSave": false,
package/dist/index.cjs CHANGED
@@ -178,6 +178,7 @@ var GLOB_EXCLUDE = [
178
178
  "**/.output",
179
179
  "**/.vite-inspect",
180
180
  "**/.yarn",
181
+ "**/vite.config.*.timestamp-*",
181
182
  "**/CHANGELOG*.md",
182
183
  "**/*.min.*",
183
184
  "**/LICENSE*",
@@ -1215,7 +1216,7 @@ var NextJsPackages = [
1215
1216
  ];
1216
1217
  async function react(options = {}) {
1217
1218
  const {
1218
- files = [GLOB_TS, GLOB_TSX, GLOB_JS, GLOB_JSX],
1219
+ files = [GLOB_SCSS],
1219
1220
  overrides = {}
1220
1221
  } = options;
1221
1222
  await ensurePackages([
@@ -1896,10 +1897,11 @@ async function typescript(options = {}) {
1896
1897
  "ts/no-unsafe-call": "error",
1897
1898
  "ts/no-unsafe-member-access": "error",
1898
1899
  "ts/no-unsafe-return": "error",
1900
+ "ts/promise-function-async": "error",
1899
1901
  "ts/restrict-plus-operands": "error",
1900
1902
  "ts/restrict-template-expressions": "error",
1901
- "ts/return-await": "error",
1902
- "ts/strict-boolean-expressions": "error",
1903
+ "ts/return-await": ["error", "in-try-catch"],
1904
+ "ts/strict-boolean-expressions": ["error", { allowNullableBoolean: true, allowNullableObject: true }],
1903
1905
  "ts/switch-exhaustiveness-check": "error",
1904
1906
  "ts/unbound-method": "error"
1905
1907
  };
@@ -1989,10 +1991,7 @@ async function typescript(options = {}) {
1989
1991
  files: filesTypeAware,
1990
1992
  ignores: ignoresTypeAware,
1991
1993
  name: "antfu/typescript/rules-type-aware",
1992
- rules: {
1993
- ...tsconfigPath ? typeAwareRules : {},
1994
- ...overrides
1995
- }
1994
+ rules: typeAwareRules
1996
1995
  }] : [],
1997
1996
  {
1998
1997
  files: ["**/*.d.?([cm])ts"],