@antfu/eslint-config 2.18.0 → 2.19.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
@@ -48,8 +48,8 @@ var import_picocolors = __toESM(require("picocolors"), 1);
48
48
  var package_default = {
49
49
  name: "@antfu/eslint-config",
50
50
  type: "module",
51
- version: "2.18.0",
52
- packageManager: "pnpm@9.1.1",
51
+ version: "2.19.0",
52
+ packageManager: "pnpm@9.1.2",
53
53
  description: "Anthony's ESLint config",
54
54
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
55
55
  license: "MIT",
@@ -146,52 +146,52 @@ var package_default = {
146
146
  "@antfu/install-pkg": "^0.3.3",
147
147
  "@clack/prompts": "^0.7.0",
148
148
  "@stylistic/eslint-plugin": "^2.1.0",
149
- "@typescript-eslint/eslint-plugin": "^7.9.0",
150
- "@typescript-eslint/parser": "^7.9.0",
149
+ "@typescript-eslint/eslint-plugin": "^7.10.0",
150
+ "@typescript-eslint/parser": "^7.10.0",
151
151
  "eslint-config-flat-gitignore": "^0.1.5",
152
- "eslint-flat-config-utils": "^0.2.4",
152
+ "eslint-flat-config-utils": "^0.2.5",
153
153
  "eslint-merge-processors": "^0.1.0",
154
- "eslint-plugin-antfu": "^2.2.0",
155
- "eslint-plugin-command": "^0.2.0",
154
+ "eslint-plugin-antfu": "^2.3.0",
155
+ "eslint-plugin-command": "^0.2.3",
156
156
  "eslint-plugin-eslint-comments": "^3.2.0",
157
- "eslint-plugin-import-x": "^0.5.0",
158
- "eslint-plugin-jsdoc": "^48.2.4",
159
- "eslint-plugin-jsonc": "^2.15.1",
157
+ "eslint-plugin-import-x": "^0.5.1",
158
+ "eslint-plugin-jsdoc": "^48.2.6",
159
+ "eslint-plugin-jsonc": "^2.16.0",
160
160
  "eslint-plugin-markdown": "^5.0.0",
161
- "eslint-plugin-n": "^17.6.0",
161
+ "eslint-plugin-n": "^17.7.0",
162
162
  "eslint-plugin-no-only-tests": "^3.1.0",
163
163
  "eslint-plugin-perfectionist": "^2.10.0",
164
- "eslint-plugin-regexp": "^2.5.0",
164
+ "eslint-plugin-regexp": "^2.6.0",
165
165
  "eslint-plugin-toml": "^0.11.0",
166
- "eslint-plugin-unicorn": "^52.0.0",
166
+ "eslint-plugin-unicorn": "^53.0.0",
167
167
  "eslint-plugin-unused-imports": "^3.2.0",
168
168
  "eslint-plugin-vitest": "^0.5.4",
169
169
  "eslint-plugin-vue": "^9.26.0",
170
170
  "eslint-plugin-yml": "^1.14.0",
171
171
  "eslint-processor-vue-blocks": "^0.1.2",
172
- globals: "^15.2.0",
172
+ globals: "^15.3.0",
173
173
  "jsonc-eslint-parser": "^2.4.0",
174
174
  "local-pkg": "^0.5.0",
175
175
  "parse-gitignore": "^2.0.0",
176
- picocolors: "^1.0.0",
176
+ picocolors: "^1.0.1",
177
177
  "toml-eslint-parser": "^0.9.3",
178
178
  "vue-eslint-parser": "^9.4.2",
179
- "yaml-eslint-parser": "^1.2.2",
179
+ "yaml-eslint-parser": "^1.2.3",
180
180
  yargs: "^17.7.2"
181
181
  },
182
182
  devDependencies: {
183
183
  "@antfu/eslint-config": "workspace:*",
184
184
  "@antfu/ni": "^0.21.12",
185
- "@eslint-react/eslint-plugin": "^1.5.11",
185
+ "@eslint-react/eslint-plugin": "^1.5.12",
186
186
  "@eslint/config-inspector": "^0.4.8",
187
187
  "@prettier/plugin-xml": "^3.4.1",
188
188
  "@stylistic/eslint-plugin-migrate": "^2.1.0",
189
189
  "@types/eslint": "^8.56.10",
190
190
  "@types/fs-extra": "^11.0.4",
191
- "@types/node": "^20.12.11",
191
+ "@types/node": "^20.12.12",
192
192
  "@types/prompts": "^2.4.9",
193
193
  "@types/yargs": "^17.0.32",
194
- "@unocss/eslint-plugin": "^0.60.2",
194
+ "@unocss/eslint-plugin": "^0.60.3",
195
195
  "astro-eslint-parser": "^1.0.2",
196
196
  bumpp: "^9.4.1",
197
197
  "bundle-require": "^4.1.0",
@@ -208,21 +208,21 @@ var package_default = {
208
208
  execa: "^9.1.0",
209
209
  "fast-glob": "^3.3.2",
210
210
  "fs-extra": "^11.2.0",
211
- "lint-staged": "^15.2.2",
212
- "prettier-plugin-astro": "^0.13.0",
211
+ "lint-staged": "^15.2.5",
212
+ "prettier-plugin-astro": "^0.14.0",
213
213
  "prettier-plugin-slidev": "^1.0.5",
214
214
  rimraf: "^5.0.7",
215
215
  "simple-git-hooks": "^2.11.1",
216
- svelte: "^4.2.16",
216
+ svelte: "^4.2.17",
217
217
  "svelte-eslint-parser": "^0.36.0",
218
218
  tsup: "^8.0.2",
219
- tsx: "^4.10.2",
219
+ tsx: "^4.11.0",
220
220
  typescript: "^5.4.5",
221
221
  vitest: "^1.6.0",
222
222
  vue: "^3.4.27"
223
223
  },
224
224
  "simple-git-hooks": {
225
- "pre-commit": "pnpm lint-staged"
225
+ "pre-commit": "npx lint-staged"
226
226
  },
227
227
  "lint-staged": {
228
228
  "*": "eslint --fix"
package/dist/cli.js CHANGED
@@ -19,8 +19,8 @@ import c from "picocolors";
19
19
  var package_default = {
20
20
  name: "@antfu/eslint-config",
21
21
  type: "module",
22
- version: "2.18.0",
23
- packageManager: "pnpm@9.1.1",
22
+ version: "2.19.0",
23
+ packageManager: "pnpm@9.1.2",
24
24
  description: "Anthony's ESLint config",
25
25
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
26
26
  license: "MIT",
@@ -117,52 +117,52 @@ var package_default = {
117
117
  "@antfu/install-pkg": "^0.3.3",
118
118
  "@clack/prompts": "^0.7.0",
119
119
  "@stylistic/eslint-plugin": "^2.1.0",
120
- "@typescript-eslint/eslint-plugin": "^7.9.0",
121
- "@typescript-eslint/parser": "^7.9.0",
120
+ "@typescript-eslint/eslint-plugin": "^7.10.0",
121
+ "@typescript-eslint/parser": "^7.10.0",
122
122
  "eslint-config-flat-gitignore": "^0.1.5",
123
- "eslint-flat-config-utils": "^0.2.4",
123
+ "eslint-flat-config-utils": "^0.2.5",
124
124
  "eslint-merge-processors": "^0.1.0",
125
- "eslint-plugin-antfu": "^2.2.0",
126
- "eslint-plugin-command": "^0.2.0",
125
+ "eslint-plugin-antfu": "^2.3.0",
126
+ "eslint-plugin-command": "^0.2.3",
127
127
  "eslint-plugin-eslint-comments": "^3.2.0",
128
- "eslint-plugin-import-x": "^0.5.0",
129
- "eslint-plugin-jsdoc": "^48.2.4",
130
- "eslint-plugin-jsonc": "^2.15.1",
128
+ "eslint-plugin-import-x": "^0.5.1",
129
+ "eslint-plugin-jsdoc": "^48.2.6",
130
+ "eslint-plugin-jsonc": "^2.16.0",
131
131
  "eslint-plugin-markdown": "^5.0.0",
132
- "eslint-plugin-n": "^17.6.0",
132
+ "eslint-plugin-n": "^17.7.0",
133
133
  "eslint-plugin-no-only-tests": "^3.1.0",
134
134
  "eslint-plugin-perfectionist": "^2.10.0",
135
- "eslint-plugin-regexp": "^2.5.0",
135
+ "eslint-plugin-regexp": "^2.6.0",
136
136
  "eslint-plugin-toml": "^0.11.0",
137
- "eslint-plugin-unicorn": "^52.0.0",
137
+ "eslint-plugin-unicorn": "^53.0.0",
138
138
  "eslint-plugin-unused-imports": "^3.2.0",
139
139
  "eslint-plugin-vitest": "^0.5.4",
140
140
  "eslint-plugin-vue": "^9.26.0",
141
141
  "eslint-plugin-yml": "^1.14.0",
142
142
  "eslint-processor-vue-blocks": "^0.1.2",
143
- globals: "^15.2.0",
143
+ globals: "^15.3.0",
144
144
  "jsonc-eslint-parser": "^2.4.0",
145
145
  "local-pkg": "^0.5.0",
146
146
  "parse-gitignore": "^2.0.0",
147
- picocolors: "^1.0.0",
147
+ picocolors: "^1.0.1",
148
148
  "toml-eslint-parser": "^0.9.3",
149
149
  "vue-eslint-parser": "^9.4.2",
150
- "yaml-eslint-parser": "^1.2.2",
150
+ "yaml-eslint-parser": "^1.2.3",
151
151
  yargs: "^17.7.2"
152
152
  },
153
153
  devDependencies: {
154
154
  "@antfu/eslint-config": "workspace:*",
155
155
  "@antfu/ni": "^0.21.12",
156
- "@eslint-react/eslint-plugin": "^1.5.11",
156
+ "@eslint-react/eslint-plugin": "^1.5.12",
157
157
  "@eslint/config-inspector": "^0.4.8",
158
158
  "@prettier/plugin-xml": "^3.4.1",
159
159
  "@stylistic/eslint-plugin-migrate": "^2.1.0",
160
160
  "@types/eslint": "^8.56.10",
161
161
  "@types/fs-extra": "^11.0.4",
162
- "@types/node": "^20.12.11",
162
+ "@types/node": "^20.12.12",
163
163
  "@types/prompts": "^2.4.9",
164
164
  "@types/yargs": "^17.0.32",
165
- "@unocss/eslint-plugin": "^0.60.2",
165
+ "@unocss/eslint-plugin": "^0.60.3",
166
166
  "astro-eslint-parser": "^1.0.2",
167
167
  bumpp: "^9.4.1",
168
168
  "bundle-require": "^4.1.0",
@@ -179,21 +179,21 @@ var package_default = {
179
179
  execa: "^9.1.0",
180
180
  "fast-glob": "^3.3.2",
181
181
  "fs-extra": "^11.2.0",
182
- "lint-staged": "^15.2.2",
183
- "prettier-plugin-astro": "^0.13.0",
182
+ "lint-staged": "^15.2.5",
183
+ "prettier-plugin-astro": "^0.14.0",
184
184
  "prettier-plugin-slidev": "^1.0.5",
185
185
  rimraf: "^5.0.7",
186
186
  "simple-git-hooks": "^2.11.1",
187
- svelte: "^4.2.16",
187
+ svelte: "^4.2.17",
188
188
  "svelte-eslint-parser": "^0.36.0",
189
189
  tsup: "^8.0.2",
190
- tsx: "^4.10.2",
190
+ tsx: "^4.11.0",
191
191
  typescript: "^5.4.5",
192
192
  vitest: "^1.6.0",
193
193
  vue: "^3.4.27"
194
194
  },
195
195
  "simple-git-hooks": {
196
- "pre-commit": "pnpm lint-staged"
196
+ "pre-commit": "npx lint-staged"
197
197
  },
198
198
  "lint-staged": {
199
199
  "*": "eslint --fix"
package/dist/index.cjs CHANGED
@@ -390,9 +390,9 @@ async function stylistic(options = {}) {
390
390
  ...lessOpinionated ? {
391
391
  curly: ["error", "all"]
392
392
  } : {
393
+ "antfu/curly": "error",
393
394
  "antfu/if-newline": "error",
394
- "antfu/top-level-function": "error",
395
- "curly": ["error", "multi-or-nest", "consistent"]
395
+ "antfu/top-level-function": "error"
396
396
  },
397
397
  ...overrides
398
398
  }
@@ -2373,8 +2373,9 @@ function antfu(options = {}, ...userConfigs) {
2373
2373
  // Optional plugins (installed but not enabled by default)
2374
2374
  perfectionist()
2375
2375
  );
2376
- if (enableVue)
2376
+ if (enableVue) {
2377
2377
  componentExts.push("vue");
2378
+ }
2378
2379
  if (enableTypeScript) {
2379
2380
  configs2.push(typescript({
2380
2381
  ...resolveSubOptions(options, "typescript"),
@@ -2389,8 +2390,9 @@ function antfu(options = {}, ...userConfigs) {
2389
2390
  overrides: getOverrides(options, "stylistic")
2390
2391
  }));
2391
2392
  }
2392
- if (enableRegexp)
2393
+ if (enableRegexp) {
2393
2394
  configs2.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
2395
+ }
2394
2396
  if (options.test ?? true) {
2395
2397
  configs2.push(test({
2396
2398
  isInEditor,