@sxzz/eslint-config 6.0.2 → 6.0.3

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +141 -59
  2. package/package.json +14 -14
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Linter } from 'eslint';
1
+ import type { Linter } from 'eslint';
2
2
  export { default as pluginAntfu } from 'eslint-plugin-antfu';
3
3
  export { default as pluginSxzz } from 'eslint-plugin-sxzz';
4
4
  export { default as pluginMarkdown } from '@eslint/markdown';
@@ -29,7 +29,10 @@ import * as yamlEslintParser from 'yaml-eslint-parser';
29
29
  export { yamlEslintParser as parserYml };
30
30
  import * as jsoncEslintParser from 'jsonc-eslint-parser';
31
31
  export { jsoncEslintParser as parserJsonc };
32
- import { Awaitable, Arrayable, FlatConfigComposer } from 'eslint-flat-config-utils';
32
+ import { FlatConfigComposer } from 'eslint-flat-config-utils';
33
+ import type { Arrayable, Awaitable } from 'eslint-flat-config-utils';
34
+
35
+
33
36
 
34
37
  interface Rules {
35
38
  /**
@@ -1072,233 +1075,233 @@ interface Rules {
1072
1075
  "implicit-arrow-linebreak"?: Linter.RuleEntry<ImplicitArrowLinebreak>;
1073
1076
  /**
1074
1077
  * Enforce or ban the use of inline type-only markers for named imports.
1075
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/consistent-type-specifier-style.md
1078
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/consistent-type-specifier-style.md
1076
1079
  */
1077
1080
  "import/consistent-type-specifier-style"?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>;
1078
1081
  /**
1079
1082
  * Ensure a default export is present, given a default import.
1080
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/default.md
1083
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/default.md
1081
1084
  */
1082
1085
  "import/default"?: Linter.RuleEntry<[]>;
1083
1086
  /**
1084
1087
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
1085
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/dynamic-import-chunkname.md
1088
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/dynamic-import-chunkname.md
1086
1089
  */
1087
1090
  "import/dynamic-import-chunkname"?: Linter.RuleEntry<ImportDynamicImportChunkname>;
1088
1091
  /**
1089
1092
  * Forbid any invalid exports, i.e. re-export of the same name.
1090
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/export.md
1093
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/export.md
1091
1094
  */
1092
1095
  "import/export"?: Linter.RuleEntry<[]>;
1093
1096
  /**
1094
1097
  * Ensure all exports appear after other statements.
1095
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/exports-last.md
1098
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/exports-last.md
1096
1099
  */
1097
1100
  "import/exports-last"?: Linter.RuleEntry<[]>;
1098
1101
  /**
1099
1102
  * Ensure consistent use of file extension within the import path.
1100
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/extensions.md
1103
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/extensions.md
1101
1104
  */
1102
1105
  "import/extensions"?: Linter.RuleEntry<ImportExtensions>;
1103
1106
  /**
1104
1107
  * Ensure all imports appear before other statements.
1105
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/first.md
1108
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/first.md
1106
1109
  */
1107
1110
  "import/first"?: Linter.RuleEntry<ImportFirst>;
1108
1111
  /**
1109
1112
  * Prefer named exports to be grouped together in a single export declaration.
1110
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/group-exports.md
1113
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/group-exports.md
1111
1114
  */
1112
1115
  "import/group-exports"?: Linter.RuleEntry<[]>;
1113
1116
  /**
1114
1117
  * Replaced by `import-x/first`.
1115
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/imports-first.md
1118
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/imports-first.md
1116
1119
  * @deprecated
1117
1120
  */
1118
1121
  "import/imports-first"?: Linter.RuleEntry<ImportImportsFirst>;
1119
1122
  /**
1120
1123
  * Enforce the maximum number of dependencies a module can have.
1121
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/max-dependencies.md
1124
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/max-dependencies.md
1122
1125
  */
1123
1126
  "import/max-dependencies"?: Linter.RuleEntry<ImportMaxDependencies>;
1124
1127
  /**
1125
1128
  * Ensure named imports correspond to a named export in the remote file.
1126
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/named.md
1129
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/named.md
1127
1130
  */
1128
1131
  "import/named"?: Linter.RuleEntry<ImportNamed>;
1129
1132
  /**
1130
1133
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
1131
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/namespace.md
1134
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/namespace.md
1132
1135
  */
1133
1136
  "import/namespace"?: Linter.RuleEntry<ImportNamespace>;
1134
1137
  /**
1135
1138
  * Enforce a newline after import statements.
1136
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/newline-after-import.md
1139
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/newline-after-import.md
1137
1140
  */
1138
1141
  "import/newline-after-import"?: Linter.RuleEntry<ImportNewlineAfterImport>;
1139
1142
  /**
1140
1143
  * Forbid import of modules using absolute paths.
1141
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-absolute-path.md
1144
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-absolute-path.md
1142
1145
  */
1143
1146
  "import/no-absolute-path"?: Linter.RuleEntry<ImportNoAbsolutePath>;
1144
1147
  /**
1145
1148
  * Forbid AMD `require` and `define` calls.
1146
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-amd.md
1149
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-amd.md
1147
1150
  */
1148
1151
  "import/no-amd"?: Linter.RuleEntry<[]>;
1149
1152
  /**
1150
1153
  * Forbid anonymous values as default exports.
1151
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-anonymous-default-export.md
1154
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-anonymous-default-export.md
1152
1155
  */
1153
1156
  "import/no-anonymous-default-export"?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>;
1154
1157
  /**
1155
1158
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
1156
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-commonjs.md
1159
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-commonjs.md
1157
1160
  */
1158
1161
  "import/no-commonjs"?: Linter.RuleEntry<ImportNoCommonjs>;
1159
1162
  /**
1160
1163
  * Forbid a module from importing a module with a dependency path back to itself.
1161
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-cycle.md
1164
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-cycle.md
1162
1165
  */
1163
1166
  "import/no-cycle"?: Linter.RuleEntry<ImportNoCycle>;
1164
1167
  /**
1165
1168
  * Forbid default exports.
1166
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-default-export.md
1169
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-default-export.md
1167
1170
  */
1168
1171
  "import/no-default-export"?: Linter.RuleEntry<[]>;
1169
1172
  /**
1170
1173
  * Forbid imported names marked with `@deprecated` documentation tag.
1171
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-deprecated.md
1174
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-deprecated.md
1172
1175
  */
1173
1176
  "import/no-deprecated"?: Linter.RuleEntry<[]>;
1174
1177
  /**
1175
1178
  * Forbid repeated import of the same module in multiple places.
1176
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-duplicates.md
1179
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-duplicates.md
1177
1180
  */
1178
1181
  "import/no-duplicates"?: Linter.RuleEntry<ImportNoDuplicates>;
1179
1182
  /**
1180
1183
  * Forbid `require()` calls with expressions.
1181
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-dynamic-require.md
1184
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-dynamic-require.md
1182
1185
  */
1183
1186
  "import/no-dynamic-require"?: Linter.RuleEntry<ImportNoDynamicRequire>;
1184
1187
  /**
1185
1188
  * Forbid empty named import blocks.
1186
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-empty-named-blocks.md
1189
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-empty-named-blocks.md
1187
1190
  */
1188
1191
  "import/no-empty-named-blocks"?: Linter.RuleEntry<[]>;
1189
1192
  /**
1190
1193
  * Forbid the use of extraneous packages.
1191
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-extraneous-dependencies.md
1194
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-extraneous-dependencies.md
1192
1195
  */
1193
1196
  "import/no-extraneous-dependencies"?: Linter.RuleEntry<ImportNoExtraneousDependencies>;
1194
1197
  /**
1195
1198
  * Forbid import statements with CommonJS module.exports.
1196
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-import-module-exports.md
1199
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-import-module-exports.md
1197
1200
  */
1198
1201
  "import/no-import-module-exports"?: Linter.RuleEntry<ImportNoImportModuleExports>;
1199
1202
  /**
1200
1203
  * Forbid importing the submodules of other modules.
1201
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-internal-modules.md
1204
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-internal-modules.md
1202
1205
  */
1203
1206
  "import/no-internal-modules"?: Linter.RuleEntry<ImportNoInternalModules>;
1204
1207
  /**
1205
1208
  * Forbid the use of mutable exports with `var` or `let`.
1206
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-mutable-exports.md
1209
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-mutable-exports.md
1207
1210
  */
1208
1211
  "import/no-mutable-exports"?: Linter.RuleEntry<[]>;
1209
1212
  /**
1210
1213
  * Forbid use of exported name as identifier of default export.
1211
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-as-default.md
1214
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-as-default.md
1212
1215
  */
1213
1216
  "import/no-named-as-default"?: Linter.RuleEntry<[]>;
1214
1217
  /**
1215
1218
  * Forbid use of exported name as property of default export.
1216
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-as-default-member.md
1219
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-as-default-member.md
1217
1220
  */
1218
1221
  "import/no-named-as-default-member"?: Linter.RuleEntry<[]>;
1219
1222
  /**
1220
1223
  * Forbid named default exports.
1221
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-default.md
1224
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-default.md
1222
1225
  */
1223
1226
  "import/no-named-default"?: Linter.RuleEntry<[]>;
1224
1227
  /**
1225
1228
  * Forbid named exports.
1226
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-export.md
1229
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-export.md
1227
1230
  */
1228
1231
  "import/no-named-export"?: Linter.RuleEntry<[]>;
1229
1232
  /**
1230
1233
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
1231
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-namespace.md
1234
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-namespace.md
1232
1235
  */
1233
1236
  "import/no-namespace"?: Linter.RuleEntry<ImportNoNamespace>;
1234
1237
  /**
1235
1238
  * Forbid Node.js builtin modules.
1236
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-nodejs-modules.md
1239
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-nodejs-modules.md
1237
1240
  */
1238
1241
  "import/no-nodejs-modules"?: Linter.RuleEntry<ImportNoNodejsModules>;
1239
1242
  /**
1240
1243
  * Forbid importing packages through relative paths.
1241
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-relative-packages.md
1244
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-relative-packages.md
1242
1245
  */
1243
1246
  "import/no-relative-packages"?: Linter.RuleEntry<ImportNoRelativePackages>;
1244
1247
  /**
1245
1248
  * Forbid importing modules from parent directories.
1246
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-relative-parent-imports.md
1249
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-relative-parent-imports.md
1247
1250
  */
1248
1251
  "import/no-relative-parent-imports"?: Linter.RuleEntry<ImportNoRelativeParentImports>;
1249
1252
  /**
1250
1253
  * Forbid importing a default export by a different name.
1251
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-rename-default.md
1254
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-rename-default.md
1252
1255
  */
1253
1256
  "import/no-rename-default"?: Linter.RuleEntry<ImportNoRenameDefault>;
1254
1257
  /**
1255
1258
  * Enforce which files can be imported in a given folder.
1256
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-restricted-paths.md
1259
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-restricted-paths.md
1257
1260
  */
1258
1261
  "import/no-restricted-paths"?: Linter.RuleEntry<ImportNoRestrictedPaths>;
1259
1262
  /**
1260
1263
  * Forbid a module from importing itself.
1261
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-self-import.md
1264
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-self-import.md
1262
1265
  */
1263
1266
  "import/no-self-import"?: Linter.RuleEntry<[]>;
1264
1267
  /**
1265
1268
  * Forbid unassigned imports.
1266
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-unassigned-import.md
1269
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-unassigned-import.md
1267
1270
  */
1268
1271
  "import/no-unassigned-import"?: Linter.RuleEntry<ImportNoUnassignedImport>;
1269
1272
  /**
1270
1273
  * Ensure imports point to a file/module that can be resolved.
1271
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-unresolved.md
1274
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-unresolved.md
1272
1275
  */
1273
1276
  "import/no-unresolved"?: Linter.RuleEntry<ImportNoUnresolved>;
1274
1277
  /**
1275
1278
  * Forbid modules without exports, or exports without matching import in another module.
1276
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-unused-modules.md
1279
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-unused-modules.md
1277
1280
  */
1278
1281
  "import/no-unused-modules"?: Linter.RuleEntry<ImportNoUnusedModules>;
1279
1282
  /**
1280
1283
  * Forbid unnecessary path segments in import and require statements.
1281
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-useless-path-segments.md
1284
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-useless-path-segments.md
1282
1285
  */
1283
1286
  "import/no-useless-path-segments"?: Linter.RuleEntry<ImportNoUselessPathSegments>;
1284
1287
  /**
1285
1288
  * Forbid webpack loader syntax in imports.
1286
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-webpack-loader-syntax.md
1289
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-webpack-loader-syntax.md
1287
1290
  */
1288
1291
  "import/no-webpack-loader-syntax"?: Linter.RuleEntry<[]>;
1289
1292
  /**
1290
1293
  * Enforce a convention in module import order.
1291
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/order.md
1294
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/order.md
1292
1295
  */
1293
1296
  "import/order"?: Linter.RuleEntry<ImportOrder>;
1294
1297
  /**
1295
1298
  * Prefer a default export if module exports a single name or multiple names.
1296
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/prefer-default-export.md
1299
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/prefer-default-export.md
1297
1300
  */
1298
1301
  "import/prefer-default-export"?: Linter.RuleEntry<ImportPreferDefaultExport>;
1299
1302
  /**
1300
1303
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
1301
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/unambiguous.md
1304
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/unambiguous.md
1302
1305
  */
1303
1306
  "import/unambiguous"?: Linter.RuleEntry<[]>;
1304
1307
  /**
@@ -3160,19 +3163,29 @@ interface Rules {
3160
3163
  "perfectionist/sort-variable-declarations"?: Linter.RuleEntry<PerfectionistSortVariableDeclarations>;
3161
3164
  /**
3162
3165
  * Enforce using "catalog:" in `package.json`
3163
- * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/enforce-catalog.test.ts
3166
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-enforce-catalog.test.ts
3164
3167
  */
3165
- "pnpm/enforce-catalog"?: Linter.RuleEntry<PnpmEnforceCatalog>;
3168
+ "pnpm/json-enforce-catalog"?: Linter.RuleEntry<PnpmJsonEnforceCatalog>;
3166
3169
  /**
3167
3170
  * Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This would requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037.
3168
- * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/prefer-workspace-settings.test.ts
3171
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-prefer-workspace-settings.test.ts
3169
3172
  */
3170
- "pnpm/prefer-workspace-settings"?: Linter.RuleEntry<PnpmPreferWorkspaceSettings>;
3173
+ "pnpm/json-prefer-workspace-settings"?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings>;
3171
3174
  /**
3172
3175
  * Enforce using valid catalog in `package.json`
3173
- * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/valid-catalog.test.ts
3176
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-valid-catalog.test.ts
3177
+ */
3178
+ "pnpm/json-valid-catalog"?: Linter.RuleEntry<PnpmJsonValidCatalog>;
3179
+ /**
3180
+ * Disallow unused catalogs in `pnpm-workspace.yaml`
3181
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/yaml-no-duplicate-catalog-item.test.ts
3174
3182
  */
3175
- "pnpm/valid-catalog"?: Linter.RuleEntry<PnpmValidCatalog>;
3183
+ "pnpm/yaml-no-duplicate-catalog-item"?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem>;
3184
+ /**
3185
+ * Disallow unused catalogs in `pnpm-workspace.yaml`
3186
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/yaml-no-unused-catalog-item.test.ts
3187
+ */
3188
+ "pnpm/yaml-no-unused-catalog-item"?: Linter.RuleEntry<[]>;
3176
3189
  /**
3177
3190
  * Require using arrow functions for callbacks
3178
3191
  * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
@@ -6965,7 +6978,7 @@ type IdMatch = [] | [string] | [string, {
6965
6978
  ignoreDestructuring?: boolean
6966
6979
  }];
6967
6980
  type ImplicitArrowLinebreak = [] | [("beside" | "below")];
6968
- type ImportConsistentTypeSpecifierStyle = [] | [("prefer-inline" | "prefer-top-level")];
6981
+ type ImportConsistentTypeSpecifierStyle = [] | [("prefer-top-level" | "prefer-inline")];
6969
6982
  type ImportDynamicImportChunkname = [] | [{
6970
6983
  importFunctions?: string[]
6971
6984
  allowEmpty?: boolean
@@ -7139,6 +7152,17 @@ type ImportOrder = [] | [{
7139
7152
  position?: ("after" | "before")
7140
7153
  }[]
7141
7154
  "newlines-between"?: ("ignore" | "always" | "always-and-inside-groups" | "never")
7155
+ "newlines-between-types"?: ("ignore" | "always" | "always-and-inside-groups" | "never")
7156
+ consolidateIslands?: ("inside-groups" | "never")
7157
+ sortTypesGroup?: boolean
7158
+ named?: (boolean | {
7159
+ enabled?: boolean
7160
+ import?: boolean
7161
+ export?: boolean
7162
+ require?: boolean
7163
+ cjsExports?: boolean
7164
+ types?: ("mixed" | "types-first" | "types-last")
7165
+ })
7142
7166
  alphabetize?: {
7143
7167
  caseInsensitive?: boolean
7144
7168
  order?: ("ignore" | "asc" | "desc")
@@ -10330,19 +10354,26 @@ type PerfectionistSortVariableDeclarations = [] | [{
10330
10354
  })
10331
10355
  partitionByNewLine?: boolean
10332
10356
  }];
10333
- type PnpmEnforceCatalog = [] | [{
10357
+ type PnpmJsonEnforceCatalog = [] | [{
10334
10358
  allowedProtocols?: string[]
10335
10359
  autofix?: boolean
10336
10360
  defaultCatalog?: string
10337
10361
  reuseExistingCatalog?: boolean
10362
+ conflicts?: ("new-catalog" | "overrides" | "error")
10363
+ fields?: string[]
10338
10364
  }];
10339
- type PnpmPreferWorkspaceSettings = [] | [{
10365
+ type PnpmJsonPreferWorkspaceSettings = [] | [{
10340
10366
  autofix?: boolean
10341
10367
  }];
10342
- type PnpmValidCatalog = [] | [{
10368
+ type PnpmJsonValidCatalog = [] | [{
10343
10369
  autoInsert?: boolean
10344
10370
  autoInsertDefaultSpecifier?: string
10345
10371
  autofix?: boolean
10372
+ enforceNoConflict?: boolean
10373
+ fields?: unknown[]
10374
+ }];
10375
+ type PnpmYamlNoDuplicateCatalogItem = [] | [{
10376
+ allow?: string[]
10346
10377
  }];
10347
10378
  type PreferArrowCallback = [] | [{
10348
10379
  allowNamedFunctions?: boolean
@@ -12021,6 +12052,9 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
12021
12052
  }];
12022
12053
  type ConfigNames = "sxzz/global-ignores" | "sxzz/gitignore" | "sxzz/js/recommended" | "sxzz/js" | "sxzz/comments/recommended" | "sxzz/comments" | "sxzz/imports" | "sxzz/unicorn" | "sxzz/node" | "sxzz/jsdoc" | "sxzz/regexp" | "sxzz/de-morgan" | "sxzz/typescript__typescript-eslint/base" | "sxzz/typescript__typescript-eslint/eslint-recommended" | "sxzz/typescript__typescript-eslint/recommended" | "sxzz/typescript" | "sxzz/typescript/dts-rules" | "sxzz/typescript/cjs-rules" | "sxzz/sort/imports" | "sxzz/markdown/recommended/plugin" | "sxzz/markdown/recommended/processor" | "sxzz/markdown/recommended/code-blocks" | "sxzz/markdown-rules" | "sxzz/yaml/setup" | "sxzz/yaml/rules" | "sxzz/json" | "sxzz/sort/package.json" | "sxzz/sort/tsconfig" | "sxzz/sort/pnpm-workspace" | "sxzz/vue/typescript__typescript-eslint/base" | "sxzz/vue/typescript__typescript-eslint/eslint-recommended" | "sxzz/vue/typescript__typescript-eslint/recommended" | "sxzz/vue/typescript" | "sxzz/vue" | "sxzz/vue/reactivity-transform" | "sxzz/unocss" | "sxzz/prettier" | "sxzz/command" | "sxzz/pnpm/rules" | "sxzz/special/cli" | "sxzz/special/tests" | "sxzz/special/allow-default-export";
12023
12054
 
12055
+
12056
+
12057
+
12024
12058
  type Config = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
12025
12059
  /**
12026
12060
  * An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
@@ -12030,50 +12064,90 @@ type Config = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
12030
12064
  plugins?: Record<string, any>
12031
12065
  };
12032
12066
 
12067
+
12068
+
12033
12069
  declare const command: () => Config[];
12034
12070
 
12071
+
12072
+
12035
12073
  declare const comments: () => Config[];
12036
12074
 
12075
+
12076
+
12037
12077
  declare const deMorgan: () => Config[];
12038
12078
 
12079
+
12080
+
12039
12081
  declare const ignores: () => Config[];
12040
12082
 
12083
+
12084
+
12041
12085
  declare const imports: () => Config[];
12042
12086
 
12087
+
12088
+
12043
12089
  declare const restrictedSyntaxJs: string[];
12044
12090
  declare const javascript: () => Config[];
12045
12091
 
12092
+
12093
+
12046
12094
  declare const jsdoc: () => Config[];
12047
12095
 
12096
+
12097
+
12048
12098
  declare const jsonc: () => Config[];
12049
12099
 
12100
+
12101
+
12050
12102
  declare const markdown: () => Config[];
12051
12103
 
12104
+
12105
+
12052
12106
  declare const node: () => Config[];
12053
12107
 
12108
+
12109
+
12054
12110
  declare function pnpm(): Promise<Config[]>;
12055
12111
 
12112
+
12113
+
12056
12114
  declare const prettier: () => Config[];
12057
12115
 
12116
+
12117
+
12058
12118
  declare const regexp: () => Config[];
12059
12119
 
12120
+
12121
+
12060
12122
  declare const sortPackageJson: () => Config[];
12061
12123
  declare const sortTsconfig: () => Config[];
12062
12124
  declare const sortPnpmWorkspace: () => Config[];
12063
12125
  declare const sortImports: () => Config[];
12064
12126
 
12127
+
12128
+
12065
12129
  declare const specialCases: () => Config[];
12066
12130
 
12131
+
12132
+
12067
12133
  declare const typescriptCore: Config[];
12068
12134
  declare const typescript: () => Config[];
12069
12135
 
12136
+
12137
+
12070
12138
  declare const unicorn: () => Config[];
12071
12139
 
12140
+
12141
+
12072
12142
  declare const unocss: () => Promise<Config[]>;
12073
12143
 
12144
+
12145
+
12074
12146
  declare const reactivityTransform: () => Config[];
12075
12147
  declare const vue: () => Config[];
12076
12148
 
12149
+
12150
+
12077
12151
  declare const yml: () => Config[];
12078
12152
 
12079
12153
  declare const hasTypeScript: () => boolean;
@@ -12105,6 +12179,13 @@ declare const GLOB_DIST: "**/dist";
12105
12179
  declare const GLOB_LOCKFILE: string[];
12106
12180
  declare const GLOB_EXCLUDE: string[];
12107
12181
 
12182
+
12183
+
12184
+
12185
+
12186
+
12187
+
12188
+
12108
12189
  /** Ignore common files and include javascript support */
12109
12190
  declare const presetJavaScript: () => Config[];
12110
12191
  /** Includes basic json(c) file support and sorting json keys */
@@ -12138,4 +12219,5 @@ interface Options {
12138
12219
  /** `@sxzz`'s preset. */
12139
12220
  declare function sxzz(options?: Options, ...userConfigs: Awaitable<Arrayable<Config> | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<Config, ConfigNames>;
12140
12221
 
12141
- export { type Config, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type Options, type Rules, command, comments, deMorgan, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, pnpm, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortPnpmWorkspace, sortTsconfig, specialCases, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
12222
+ export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, command, comments, deMorgan, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, pnpm, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortPnpmWorkspace, sortTsconfig, specialCases, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
12223
+ export type { Config, ConfigNames, Options, Rules };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
- "version": "6.0.2",
3
+ "version": "6.0.3",
4
4
  "description": "ESLint config for @sxzz.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,23 +38,23 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
41
- "@eslint/js": "^9.21.0",
41
+ "@eslint/js": "^9.22.0",
42
42
  "@eslint/markdown": "^6.3.0",
43
43
  "eslint-config-flat-gitignore": "^2.1.0",
44
44
  "eslint-config-prettier": "^10.1.1",
45
45
  "eslint-flat-config-utils": "^2.0.1",
46
46
  "eslint-plugin-antfu": "^3.1.1",
47
47
  "eslint-plugin-command": "^3.1.0",
48
- "eslint-plugin-de-morgan": "^1.2.0",
49
- "eslint-plugin-import-x": "^4.6.1",
50
- "eslint-plugin-jsdoc": "^50.6.3",
48
+ "eslint-plugin-de-morgan": "^1.2.1",
49
+ "eslint-plugin-import-x": "^4.9.1",
50
+ "eslint-plugin-jsdoc": "^50.6.8",
51
51
  "eslint-plugin-jsonc": "^2.19.1",
52
52
  "eslint-plugin-n": "^17.16.2",
53
53
  "eslint-plugin-perfectionist": "^4.10.1",
54
- "eslint-plugin-pnpm": "^0.1.2",
54
+ "eslint-plugin-pnpm": "^0.3.1",
55
55
  "eslint-plugin-prettier": "^5.2.3",
56
56
  "eslint-plugin-regexp": "^2.7.0",
57
- "eslint-plugin-sxzz": "^0.2.1",
57
+ "eslint-plugin-sxzz": "^0.2.2",
58
58
  "eslint-plugin-unicorn": "^57.0.0",
59
59
  "eslint-plugin-unused-imports": "^4.1.4",
60
60
  "eslint-plugin-vue": "^10.0.0",
@@ -63,20 +63,20 @@
63
63
  "jsonc-eslint-parser": "^2.4.0",
64
64
  "local-pkg": "^1.1.1",
65
65
  "prettier": "^3.5.3",
66
- "typescript-eslint": "^8.26.0",
66
+ "typescript-eslint": "^8.27.0",
67
67
  "vue-eslint-parser": "^10.1.1",
68
68
  "yaml-eslint-parser": "^1.3.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@eslint/config-inspector": "^1.0.2",
72
72
  "@sxzz/prettier-config": "^2.2.1",
73
- "@types/node": "^22.13.9",
74
- "@unocss/eslint-plugin": "^66.1.0-beta.3",
73
+ "@types/node": "^22.13.10",
74
+ "@unocss/eslint-plugin": "^66.1.0-beta.6",
75
75
  "ansis": "^3.17.0",
76
- "bumpp": "^10.0.3",
77
- "eslint": "^9.21.0",
78
- "eslint-typegen": "^2.0.0",
79
- "tsdown": "^0.6.4",
76
+ "bumpp": "^10.1.0",
77
+ "eslint": "^9.22.0",
78
+ "eslint-typegen": "^2.1.0",
79
+ "tsdown": "^0.6.9",
80
80
  "tsx": "^4.19.3",
81
81
  "typescript": "^5.8.2"
82
82
  },