@antfu/eslint-config 4.7.0 → 4.8.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/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ import c from "ansis";
11
11
  var package_default = {
12
12
  name: "@antfu/eslint-config",
13
13
  type: "module",
14
- version: "4.7.0",
14
+ version: "4.8.1",
15
15
  packageManager: "pnpm@10.6.1",
16
16
  description: "Anthony's ESLint config",
17
17
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -103,82 +103,76 @@ var package_default = {
103
103
  }
104
104
  },
105
105
  dependencies: {
106
- "@antfu/install-pkg": "^1.0.0",
107
- "@clack/prompts": "^0.10.0",
108
- "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
109
- "@eslint/markdown": "^6.3.0",
110
- "@stylistic/eslint-plugin": "^4.2.0",
111
- "@typescript-eslint/eslint-plugin": "^8.26.0",
112
- "@typescript-eslint/parser": "^8.26.0",
113
- "@vitest/eslint-plugin": "^1.1.36",
114
- ansis: "^3.17.0",
115
- cac: "^6.7.14",
116
- "eslint-config-flat-gitignore": "^2.1.0",
117
- "eslint-flat-config-utils": "^2.0.1",
118
- "eslint-merge-processors": "^2.0.0",
119
- "eslint-plugin-antfu": "^3.1.0",
120
- "eslint-plugin-command": "^3.1.0",
121
- "eslint-plugin-import-x": "^4.6.1",
122
- "eslint-plugin-jsdoc": "^50.6.3",
123
- "eslint-plugin-jsonc": "^2.19.1",
124
- "eslint-plugin-n": "^17.16.2",
125
- "eslint-plugin-no-only-tests": "^3.3.0",
126
- "eslint-plugin-perfectionist": "^4.9.0",
127
- "eslint-plugin-pnpm-catalogs": "^0.1.0",
128
- "eslint-plugin-regexp": "^2.7.0",
129
- "eslint-plugin-toml": "^0.12.0",
130
- "eslint-plugin-unicorn": "^57.0.0",
131
- "eslint-plugin-unused-imports": "^4.1.4",
132
- "eslint-plugin-vue": "^10.0.0",
133
- "eslint-plugin-yml": "^1.17.0",
134
- "eslint-processor-vue-blocks": "^2.0.0",
135
- globals: "^16.0.0",
136
- "jsonc-eslint-parser": "^2.4.0",
137
- "local-pkg": "^1.1.1",
138
- "parse-gitignore": "^2.0.0",
139
- "toml-eslint-parser": "^0.10.0",
140
- "vue-eslint-parser": "^10.1.1",
141
- "yaml-eslint-parser": "^1.3.0"
106
+ "@antfu/install-pkg": "catalog:",
107
+ "@clack/prompts": "catalog:",
108
+ "@eslint-community/eslint-plugin-eslint-comments": "catalog:",
109
+ "@eslint/markdown": "catalog:",
110
+ "@stylistic/eslint-plugin": "catalog:",
111
+ "@typescript-eslint/eslint-plugin": "catalog:",
112
+ "@typescript-eslint/parser": "catalog:",
113
+ "@vitest/eslint-plugin": "catalog:",
114
+ ansis: "catalog:",
115
+ cac: "catalog:",
116
+ "eslint-config-flat-gitignore": "catalog:",
117
+ "eslint-flat-config-utils": "catalog:",
118
+ "eslint-merge-processors": "catalog:",
119
+ "eslint-plugin-antfu": "catalog:",
120
+ "eslint-plugin-command": "catalog:",
121
+ "eslint-plugin-import-x": "catalog:",
122
+ "eslint-plugin-jsdoc": "catalog:",
123
+ "eslint-plugin-jsonc": "catalog:",
124
+ "eslint-plugin-n": "catalog:",
125
+ "eslint-plugin-no-only-tests": "catalog:",
126
+ "eslint-plugin-perfectionist": "catalog:",
127
+ "eslint-plugin-pnpm": "catalog:",
128
+ "eslint-plugin-regexp": "catalog:",
129
+ "eslint-plugin-toml": "catalog:",
130
+ "eslint-plugin-unicorn": "catalog:",
131
+ "eslint-plugin-unused-imports": "catalog:",
132
+ "eslint-plugin-vue": "catalog:",
133
+ "eslint-plugin-yml": "catalog:",
134
+ "eslint-processor-vue-blocks": "catalog:",
135
+ globals: "catalog:",
136
+ "jsonc-eslint-parser": "catalog:",
137
+ "local-pkg": "catalog:",
138
+ "parse-gitignore": "catalog:",
139
+ "toml-eslint-parser": "catalog:",
140
+ "vue-eslint-parser": "catalog:",
141
+ "yaml-eslint-parser": "catalog:"
142
142
  },
143
143
  devDependencies: {
144
144
  "@antfu/eslint-config": "workspace:*",
145
- "@antfu/ni": "^23.3.1",
146
- "@eslint-react/eslint-plugin": "^1.31.0",
147
- "@eslint/config-inspector": "^1.0.2",
148
- "@prettier/plugin-xml": "^3.4.1",
149
- "@stylistic/eslint-plugin-migrate": "^4.2.0",
150
- "@types/node": "^22.13.9",
151
- "@unocss/eslint-plugin": "^66.0.0",
152
- "astro-eslint-parser": "^1.2.1",
153
- bumpp: "^10.0.3",
154
- eslint: "^9.21.0",
155
- "eslint-plugin-astro": "^1.3.1",
156
- "eslint-plugin-format": "^1.0.1",
157
- "eslint-plugin-react-hooks": "^5.2.0",
158
- "eslint-plugin-react-refresh": "^0.4.19",
159
- "eslint-plugin-solid": "^0.14.5",
160
- "eslint-plugin-svelte": "^3.0.3",
161
- "eslint-typegen": "^2.0.0",
162
- execa: "^9.5.2",
163
- jiti: "^2.4.2",
164
- "lint-staged": "^15.4.3",
165
- "prettier-plugin-astro": "^0.14.1",
166
- "prettier-plugin-slidev": "^1.0.5",
167
- "simple-git-hooks": "^2.11.1",
168
- svelte: "^5.22.5",
169
- "svelte-eslint-parser": "^1.0.1",
170
- tinyglobby: "^0.2.12",
171
- tsup: "^8.4.0",
172
- tsx: "^4.19.3",
173
- typescript: "^5.8.2",
174
- vitest: "^3.0.8",
175
- vue: "^3.5.13"
176
- },
177
- resolutions: {
178
- "@eslint-community/eslint-utils": "^4.4.1",
179
- "@typescript-eslint/utils": "^8.26.0",
180
- eslint: "^9.21.0",
181
- tsx: "^4.19.3"
145
+ "@antfu/ni": "catalog:",
146
+ "@eslint-react/eslint-plugin": "catalog:",
147
+ "@eslint/config-inspector": "catalog:",
148
+ "@prettier/plugin-xml": "catalog:",
149
+ "@stylistic/eslint-plugin-migrate": "catalog:",
150
+ "@types/node": "catalog:",
151
+ "@unocss/eslint-plugin": "catalog:",
152
+ "astro-eslint-parser": "catalog:",
153
+ bumpp: "catalog:",
154
+ eslint: "catalog:",
155
+ "eslint-plugin-astro": "catalog:",
156
+ "eslint-plugin-format": "catalog:",
157
+ "eslint-plugin-react-hooks": "catalog:",
158
+ "eslint-plugin-react-refresh": "catalog:",
159
+ "eslint-plugin-solid": "catalog:",
160
+ "eslint-plugin-svelte": "catalog:",
161
+ "eslint-typegen": "catalog:",
162
+ execa: "catalog:",
163
+ jiti: "catalog:",
164
+ "lint-staged": "catalog:",
165
+ "prettier-plugin-astro": "catalog:",
166
+ "prettier-plugin-slidev": "catalog:",
167
+ "simple-git-hooks": "catalog:",
168
+ svelte: "catalog:",
169
+ "svelte-eslint-parser": "catalog:",
170
+ tinyglobby: "catalog:",
171
+ tsup: "catalog:",
172
+ tsx: "catalog:",
173
+ typescript: "catalog:",
174
+ vitest: "catalog:",
175
+ vue: "catalog:"
182
176
  },
183
177
  "simple-git-hooks": {
184
178
  "pre-commit": "npx lint-staged"
package/dist/index.d.ts CHANGED
@@ -17400,16 +17400,16 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
17400
17400
  */
17401
17401
  unocss?: boolean | OptionsUnoCSS;
17402
17402
  /**
17403
- * Enable pnpm catalogs support.
17403
+ * Enable pnpm (workspace/catalogs) support.
17404
17404
  *
17405
17405
  * Currently it's disabled by default, as it's still experimental.
17406
- * In the future it will be smartly enabled based on the project catalog usage.
17406
+ * In the future it will be smartly enabled based on the project usage.
17407
17407
  *
17408
- * @see https://github.com/antfu/pnpm-catalogs-utils
17408
+ * @see https://github.com/antfu/pnpm-workspace-utils
17409
17409
  * @experimental
17410
17410
  * @default false
17411
17411
  */
17412
- pnpmCatalogs?: boolean;
17412
+ pnpm?: boolean;
17413
17413
  /**
17414
17414
  * Use external formatters to format files.
17415
17415
  *
@@ -17512,7 +17512,7 @@ declare function node(): Promise<TypedFlatConfigItem[]>;
17512
17512
  */
17513
17513
  declare function perfectionist(): Promise<TypedFlatConfigItem[]>;
17514
17514
 
17515
- declare function pnpmCatalogs(): Promise<TypedFlatConfigItem[]>;
17515
+ declare function pnpm(): Promise<TypedFlatConfigItem[]>;
17516
17516
 
17517
17517
  declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsOverrides & OptionsFiles): Promise<TypedFlatConfigItem[]>;
17518
17518
 
@@ -17658,4 +17658,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
17658
17658
  declare function isInEditorEnv(): boolean;
17659
17659
  declare function isInGitHooksOrLintStaged(): boolean;
17660
17660
 
17661
- export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type StylisticOptions, type TypedFlatConfigItem, antfu, astro, combine, command, comments, antfu as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, pnpmCatalogs, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
17661
+ export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type StylisticOptions, type TypedFlatConfigItem, antfu, astro, combine, command, comments, antfu as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
package/dist/index.js CHANGED
@@ -1182,8 +1182,8 @@ async function perfectionist() {
1182
1182
  ];
1183
1183
  }
1184
1184
 
1185
- // src/configs/pnpm-catalogs.ts
1186
- async function pnpmCatalogs() {
1185
+ // src/configs/pnpm.ts
1186
+ async function pnpm() {
1187
1187
  return [
1188
1188
  {
1189
1189
  files: [
@@ -1193,13 +1193,14 @@ async function pnpmCatalogs() {
1193
1193
  languageOptions: {
1194
1194
  parser: await interopDefault(import("jsonc-eslint-parser"))
1195
1195
  },
1196
- name: "antfu/pnpm-catalogs/rules",
1196
+ name: "antfu/pnpm/rules",
1197
1197
  plugins: {
1198
- "pnpm-catalogs": await interopDefault(import("eslint-plugin-pnpm-catalogs"))
1198
+ pnpm: await interopDefault(import("eslint-plugin-pnpm"))
1199
1199
  },
1200
1200
  rules: {
1201
- "pnpm-catalogs/enforce-catalog": "error",
1202
- "pnpm-catalogs/valid-catalog": "error"
1201
+ "pnpm/enforce-catalog": "error",
1202
+ "pnpm/prefer-workspace-settings": "error",
1203
+ "pnpm/valid-catalog": "error"
1203
1204
  }
1204
1205
  }
1205
1206
  ];
@@ -2389,8 +2390,22 @@ async function yaml(options = {}) {
2389
2390
  {
2390
2391
  order: [
2391
2392
  "packages",
2393
+ "overrides",
2394
+ "patchedDependencies",
2395
+ "hoistPattern",
2392
2396
  "catalog",
2393
- "catalogs"
2397
+ "catalogs",
2398
+ "allowedDeprecatedVersions",
2399
+ "allowNonAppliedPatches",
2400
+ "configDependencies",
2401
+ "ignoredBuiltDependencies",
2402
+ "ignoredOptionalDependencies",
2403
+ "neverBuiltDependencies",
2404
+ "onlyBuiltDependencies",
2405
+ "onlyBuiltDependenciesFile",
2406
+ "packageExtensions",
2407
+ "peerDependencyRules",
2408
+ "supportedArchitectures"
2394
2409
  ],
2395
2410
  pathPattern: "^$"
2396
2411
  }
@@ -2435,8 +2450,8 @@ function antfu(options = {}, ...userConfigs) {
2435
2450
  componentExts = [],
2436
2451
  gitignore: enableGitignore = true,
2437
2452
  jsx: enableJsx = true,
2438
- pnpmCatalogs: enablePnpmCatalogs = false,
2439
- // TOD: smart detect
2453
+ pnpm: enableCatalogs = false,
2454
+ // TODO: smart detect
2440
2455
  react: enableReact = false,
2441
2456
  regexp: enableRegexp = true,
2442
2457
  solid: enableSolid = false,
@@ -2573,9 +2588,9 @@ function antfu(options = {}, ...userConfigs) {
2573
2588
  sortTsconfig()
2574
2589
  );
2575
2590
  }
2576
- if (enablePnpmCatalogs) {
2591
+ if (enableCatalogs) {
2577
2592
  configs2.push(
2578
- pnpmCatalogs()
2593
+ pnpm()
2579
2594
  );
2580
2595
  }
2581
2596
  if (options.yaml ?? true) {
@@ -2708,7 +2723,7 @@ export {
2708
2723
  node,
2709
2724
  parserPlain,
2710
2725
  perfectionist,
2711
- pnpmCatalogs,
2726
+ pnpm,
2712
2727
  react,
2713
2728
  regexp,
2714
2729
  renamePluginInConfigs,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "4.7.0",
4
+ "version": "4.8.1",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -91,7 +91,7 @@
91
91
  "eslint-config-flat-gitignore": "^2.1.0",
92
92
  "eslint-flat-config-utils": "^2.0.1",
93
93
  "eslint-merge-processors": "^2.0.0",
94
- "eslint-plugin-antfu": "^3.1.0",
94
+ "eslint-plugin-antfu": "^3.1.1",
95
95
  "eslint-plugin-command": "^3.1.0",
96
96
  "eslint-plugin-import-x": "^4.6.1",
97
97
  "eslint-plugin-jsdoc": "^50.6.3",
@@ -99,7 +99,7 @@
99
99
  "eslint-plugin-n": "^17.16.2",
100
100
  "eslint-plugin-no-only-tests": "^3.3.0",
101
101
  "eslint-plugin-perfectionist": "^4.9.0",
102
- "eslint-plugin-pnpm-catalogs": "^0.1.0",
102
+ "eslint-plugin-pnpm": "^0.1.1",
103
103
  "eslint-plugin-regexp": "^2.7.0",
104
104
  "eslint-plugin-toml": "^0.12.0",
105
105
  "eslint-plugin-unicorn": "^57.0.0",
@@ -139,7 +139,7 @@
139
139
  "prettier-plugin-astro": "^0.14.1",
140
140
  "prettier-plugin-slidev": "^1.0.5",
141
141
  "simple-git-hooks": "^2.11.1",
142
- "svelte": "^5.22.5",
142
+ "svelte": "^5.22.6",
143
143
  "svelte-eslint-parser": "^1.0.1",
144
144
  "tinyglobby": "^0.2.12",
145
145
  "tsup": "^8.4.0",
@@ -147,13 +147,7 @@
147
147
  "typescript": "^5.8.2",
148
148
  "vitest": "^3.0.8",
149
149
  "vue": "^3.5.13",
150
- "@antfu/eslint-config": "4.7.0"
151
- },
152
- "resolutions": {
153
- "@eslint-community/eslint-utils": "^4.4.1",
154
- "@typescript-eslint/utils": "^8.26.0",
155
- "eslint": "^9.21.0",
156
- "tsx": "^4.19.3"
150
+ "@antfu/eslint-config": "4.8.1"
157
151
  },
158
152
  "simple-git-hooks": {
159
153
  "pre-commit": "npx lint-staged"