@antfu/eslint-config 4.14.0 → 4.15.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
@@ -384,6 +384,7 @@ Since flat config requires us to explicitly provide the plugin names (instead of
384
384
 
385
385
  | New Prefix | Original Prefix | Source Plugin |
386
386
  | ---------- | ---------------------- | ------------------------------------------------------------------------------------------ |
387
+ | `import/*` | `import-lite/*` | [eslint-plugin-import-lite](https://github.com/9romise/eslint-plugin-import-lite) |
387
388
  | `node/*` | `n/*` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) |
388
389
  | `yaml/*` | `yml/*` | [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) |
389
390
  | `ts/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
@@ -497,10 +498,10 @@ export default antfu()
497
498
  )
498
499
  // overrides any named configs
499
500
  .override(
500
- 'antfu/imports',
501
+ 'antfu/stylistic/rules',
501
502
  {
502
503
  rules: {
503
- 'import/order': ['error', { 'newlines-between': 'always' }],
504
+ 'style/generator-star-spacing': ['error', { after: true, before: false }],
504
505
  }
505
506
  }
506
507
  )
package/dist/cli.js CHANGED
@@ -1,8 +1,4 @@
1
1
  import process from "node:process";
2
- import * as p$4 from "@clack/prompts";
3
- import * as p$3 from "@clack/prompts";
4
- import * as p$2 from "@clack/prompts";
5
- import * as p$1 from "@clack/prompts";
6
2
  import * as p from "@clack/prompts";
7
3
  import c, { green } from "ansis";
8
4
  import { cac } from "cac";
@@ -13,7 +9,7 @@ import parse from "parse-gitignore";
13
9
  import { execSync } from "node:child_process";
14
10
 
15
11
  //#region package.json
16
- var version = "4.14.0";
12
+ var version = "4.15.0";
17
13
 
18
14
  //#endregion
19
15
  //#region src/cli/constants.ts
@@ -152,7 +148,7 @@ async function updateEslintFiles(result) {
152
148
  const pathFlatConfig = path.join(cwd, configFileName);
153
149
  const eslintIgnores = [];
154
150
  if (fs.existsSync(pathESLintIgnore)) {
155
- p$4.log.step(c.cyan`Migrating existing .eslintignore`);
151
+ p.log.step(c.cyan`Migrating existing .eslintignore`);
156
152
  const content = await fsp.readFile(pathESLintIgnore, "utf-8");
157
153
  const parsed = parse(content);
158
154
  const globs = parsed.globs();
@@ -168,28 +164,28 @@ async function updateEslintFiles(result) {
168
164
  const additionalConfig = [];
169
165
  const eslintConfigContent = getEslintConfigContent(mainConfig, additionalConfig);
170
166
  await fsp.writeFile(pathFlatConfig, eslintConfigContent);
171
- p$4.log.success(c.green`Created ${configFileName}`);
167
+ p.log.success(c.green`Created ${configFileName}`);
172
168
  const files = fs.readdirSync(cwd);
173
169
  const legacyConfig = [];
174
170
  files.forEach((file) => {
175
171
  if (/eslint|prettier/.test(file) && !/eslint\.config\./.test(file)) legacyConfig.push(file);
176
172
  });
177
- if (legacyConfig.length) p$4.note(c.dim(legacyConfig.join(", ")), "You can now remove those files manually");
173
+ if (legacyConfig.length) p.note(c.dim(legacyConfig.join(", ")), "You can now remove those files manually");
178
174
  }
179
175
 
180
176
  //#endregion
181
177
  //#region src/cli/constants-generated.ts
182
178
  const versionsMap = {
183
- "@eslint-react/eslint-plugin": "^1.51.1",
184
- "@unocss/eslint-plugin": "^66.1.3",
179
+ "@eslint-react/eslint-plugin": "^1.52.2",
180
+ "@unocss/eslint-plugin": "^66.2.3",
185
181
  "astro-eslint-parser": "^1.2.2",
186
- "eslint": "^9.28.0",
182
+ "eslint": "^9.29.0",
187
183
  "eslint-plugin-astro": "^1.3.1",
188
184
  "eslint-plugin-format": "^1.0.1",
189
185
  "eslint-plugin-react-hooks": "^5.2.0",
190
186
  "eslint-plugin-react-refresh": "^0.4.20",
191
187
  "eslint-plugin-solid": "^0.14.5",
192
- "eslint-plugin-svelte": "^3.9.1",
188
+ "eslint-plugin-svelte": "^3.9.2",
193
189
  "prettier-plugin-astro": "^0.14.1",
194
190
  "prettier-plugin-slidev": "^1.0.5",
195
191
  "svelte-eslint-parser": "^1.2.0"
@@ -200,7 +196,7 @@ const versionsMap = {
200
196
  async function updatePackageJson(result) {
201
197
  const cwd = process.cwd();
202
198
  const pathPackageJSON = path.join(cwd, "package.json");
203
- p$3.log.step(c.cyan`Bumping @antfu/eslint-config to v${version}`);
199
+ p.log.step(c.cyan`Bumping @antfu/eslint-config to v${version}`);
204
200
  const pkgContent = await fsp.readFile(pathPackageJSON, "utf-8");
205
201
  const pkg = JSON.parse(pkgContent);
206
202
  pkg.devDependencies ??= {};
@@ -231,9 +227,9 @@ async function updatePackageJson(result) {
231
227
  addedPackages.push(f);
232
228
  });
233
229
  }
234
- if (addedPackages.length) p$3.note(c.dim(addedPackages.join(", ")), "Added packages");
230
+ if (addedPackages.length) p.note(c.dim(addedPackages.join(", ")), "Added packages");
235
231
  await fsp.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));
236
- p$3.log.success(c.green`Changes wrote to package.json`);
232
+ p.log.success(c.green`Changes wrote to package.json`);
237
233
  }
238
234
 
239
235
  //#endregion
@@ -246,14 +242,14 @@ async function updateVscodeSettings(result) {
246
242
  if (!fs.existsSync(dotVscodePath)) await fsp.mkdir(dotVscodePath, { recursive: true });
247
243
  if (!fs.existsSync(settingsPath)) {
248
244
  await fsp.writeFile(settingsPath, `{${vscodeSettingsString}}\n`, "utf-8");
249
- p$2.log.success(green`Created .vscode/settings.json`);
245
+ p.log.success(green`Created .vscode/settings.json`);
250
246
  } else {
251
247
  let settingsContent = await fsp.readFile(settingsPath, "utf8");
252
248
  settingsContent = settingsContent.trim().replace(/\s*\}$/, "");
253
249
  settingsContent += settingsContent.endsWith(",") || settingsContent.endsWith("{") ? "" : ",";
254
250
  settingsContent += `${vscodeSettingsString}}\n`;
255
251
  await fsp.writeFile(settingsPath, settingsContent, "utf-8");
256
- p$2.log.success(green`Updated .vscode/settings.json`);
252
+ p.log.success(green`Updated .vscode/settings.json`);
257
253
  }
258
254
  }
259
255
 
@@ -264,7 +260,7 @@ async function run(options = {}) {
264
260
  const argTemplate = options.frameworks?.map((m) => m?.trim()).filter(Boolean);
265
261
  const argExtra = options.extra?.map((m) => m?.trim()).filter(Boolean);
266
262
  if (fs.existsSync(path.join(process.cwd(), "eslint.config.js"))) {
267
- p$1.log.warn(c.yellow`eslint.config.js already exists, migration wizard exited.`);
263
+ p.log.warn(c.yellow`eslint.config.js already exists, migration wizard exited.`);
268
264
  return process.exit(1);
269
265
  }
270
266
  let result = {
@@ -274,10 +270,10 @@ async function run(options = {}) {
274
270
  updateVscodeSettings: true
275
271
  };
276
272
  if (!argSkipPrompt) {
277
- result = await p$1.group({
273
+ result = await p.group({
278
274
  uncommittedConfirmed: () => {
279
275
  if (argSkipPrompt || isGitClean()) return Promise.resolve(true);
280
- return p$1.confirm({
276
+ return p.confirm({
281
277
  initialValue: false,
282
278
  message: "There are uncommitted changes in the current repository, are you sure to continue?"
283
279
  });
@@ -286,7 +282,7 @@ async function run(options = {}) {
286
282
  const isArgTemplateValid = typeof argTemplate === "string" && !!frameworks.includes(argTemplate);
287
283
  if (!results.uncommittedConfirmed || isArgTemplateValid) return;
288
284
  const message = !isArgTemplateValid && argTemplate ? `"${argTemplate}" isn't a valid template. Please choose from below: ` : "Select a framework:";
289
- return p$1.multiselect({
285
+ return p.multiselect({
290
286
  message: c.reset(message),
291
287
  options: frameworkOptions,
292
288
  required: false
@@ -296,7 +292,7 @@ async function run(options = {}) {
296
292
  const isArgExtraValid = argExtra?.length && !argExtra.filter((element) => !extra.includes(element)).length;
297
293
  if (!results.uncommittedConfirmed || isArgExtraValid) return;
298
294
  const message = !isArgExtraValid && argExtra ? `"${argExtra}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
299
- return p$1.multiselect({
295
+ return p.multiselect({
300
296
  message: c.reset(message),
301
297
  options: extraOptions,
302
298
  required: false
@@ -304,13 +300,13 @@ async function run(options = {}) {
304
300
  },
305
301
  updateVscodeSettings: ({ results }) => {
306
302
  if (!results.uncommittedConfirmed) return;
307
- return p$1.confirm({
303
+ return p.confirm({
308
304
  initialValue: true,
309
305
  message: "Update .vscode/settings.json for better VS Code experience?"
310
306
  });
311
307
  }
312
308
  }, { onCancel: () => {
313
- p$1.cancel("Operation cancelled.");
309
+ p.cancel("Operation cancelled.");
314
310
  process.exit(0);
315
311
  } });
316
312
  if (!result.uncommittedConfirmed) return process.exit(1);
@@ -318,8 +314,8 @@ async function run(options = {}) {
318
314
  await updatePackageJson(result);
319
315
  await updateEslintFiles(result);
320
316
  await updateVscodeSettings(result);
321
- p$1.log.success(c.green`Setup completed`);
322
- p$1.outro(`Now you can update the dependencies by run ${c.blue("pnpm install")} and run ${c.blue("eslint --fix")}\n`);
317
+ p.log.success(c.green`Setup completed`);
318
+ p.outro(`Now you can update the dependencies by run ${c.blue("pnpm install")} and run ${c.blue("eslint --fix")}\n`);
323
319
  }
324
320
 
325
321
  //#endregion
package/dist/index.d.ts CHANGED
@@ -647,6 +647,41 @@ interface RuleOptions {
647
647
  * @deprecated
648
648
  */
649
649
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>;
650
+ /**
651
+ * Enforce or ban the use of inline type-only markers for named imports.
652
+ * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/consistent-type-specifier-style/README.md
653
+ */
654
+ 'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>;
655
+ /**
656
+ * Ensure all imports appear before other statements.
657
+ * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/first/README.md
658
+ */
659
+ 'import/first'?: Linter.RuleEntry<ImportFirst>;
660
+ /**
661
+ * Enforce a newline after import statements.
662
+ * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/newline-after-import/README.md
663
+ */
664
+ 'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>;
665
+ /**
666
+ * Forbid default exports.
667
+ * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-default-export/README.md
668
+ */
669
+ 'import/no-default-export'?: Linter.RuleEntry<[]>;
670
+ /**
671
+ * Forbid repeated import of the same module in multiple places.
672
+ * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-duplicates/README.md
673
+ */
674
+ 'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>;
675
+ /**
676
+ * Forbid the use of mutable exports with `var` or `let`.
677
+ * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-mutable-exports/README.md
678
+ */
679
+ 'import/no-mutable-exports'?: Linter.RuleEntry<[]>;
680
+ /**
681
+ * Forbid named default exports.
682
+ * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-named-default/README.md
683
+ */
684
+ 'import/no-named-default'?: Linter.RuleEntry<[]>;
650
685
  /**
651
686
  * Enforce consistent indentation
652
687
  * @see https://eslint.org/docs/latest/rules/indent
@@ -3836,11 +3871,6 @@ interface RuleOptions {
3836
3871
  * @see https://eslint.style/rules/eol-last
3837
3872
  */
3838
3873
  'style/eol-last'?: Linter.RuleEntry<StyleEolLast>;
3839
- /**
3840
- * Require or disallow spacing between function identifiers and their invocations
3841
- * @see https://eslint.style/rules/function-call-spacing
3842
- */
3843
- 'style/func-call-spacing'?: Linter.RuleEntry<StyleFuncCallSpacing>;
3844
3874
  /**
3845
3875
  * Enforce line breaks between arguments of a function call
3846
3876
  * @see https://eslint.style/rules/function-call-argument-newline
@@ -4668,6 +4698,11 @@ interface RuleOptions {
4668
4698
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md
4669
4699
  */
4670
4700
  'test/consistent-test-it'?: Linter.RuleEntry<TestConsistentTestIt>;
4701
+ /**
4702
+ * enforce using vitest or vi but not both
4703
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-vitest-vi.md
4704
+ */
4705
+ 'test/consistent-vitest-vi'?: Linter.RuleEntry<TestConsistentVitestVi>;
4671
4706
  /**
4672
4707
  * enforce having expectation in test body
4673
4708
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
@@ -4744,6 +4779,11 @@ interface RuleOptions {
4744
4779
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
4745
4780
  */
4746
4781
  'test/no-import-node-test'?: Linter.RuleEntry<[]>;
4782
+ /**
4783
+ * disallow importing Vitest globals
4784
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-importing-vitest-globals.md
4785
+ */
4786
+ 'test/no-importing-vitest-globals'?: Linter.RuleEntry<[]>;
4747
4787
  /**
4748
4788
  * disallow string interpolation in snapshots
4749
4789
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md
@@ -4780,7 +4820,7 @@ interface RuleOptions {
4780
4820
  */
4781
4821
  'test/no-standalone-expect'?: Linter.RuleEntry<TestNoStandaloneExpect>;
4782
4822
  /**
4783
- * Disallow using the `f` and `x` prefixes in favour of `.only` and `.skip`
4823
+ * disallow using the `f` and `x` prefixes in favour of `.only` and `.skip`
4784
4824
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md
4785
4825
  */
4786
4826
  'test/no-test-prefixes'?: Linter.RuleEntry<[]>;
@@ -4874,6 +4914,11 @@ interface RuleOptions {
4874
4914
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
4875
4915
  */
4876
4916
  'test/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
4917
+ /**
4918
+ * enforce importing Vitest globals
4919
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
4920
+ */
4921
+ 'test/prefer-importing-vitest-globals'?: Linter.RuleEntry<[]>;
4877
4922
  /**
4878
4923
  * enforce lowercase titles
4879
4924
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md
@@ -8169,6 +8214,20 @@ type IdMatch = [] | [string] | [string, {
8169
8214
  }];
8170
8215
  // ----- implicit-arrow-linebreak -----
8171
8216
  type ImplicitArrowLinebreak = [] | [("beside" | "below")];
8217
+ // ----- import/consistent-type-specifier-style -----
8218
+ type ImportConsistentTypeSpecifierStyle = [] | [("top-level" | "inline" | "prefer-top-level")];
8219
+ // ----- import/first -----
8220
+ type ImportFirst = [] | [("absolute-first" | "disable-absolute-first")];
8221
+ // ----- import/newline-after-import -----
8222
+ type ImportNewlineAfterImport = [] | [{
8223
+ count?: number;
8224
+ exactCount?: boolean;
8225
+ considerComments?: boolean;
8226
+ }];
8227
+ // ----- import/no-duplicates -----
8228
+ type ImportNoDuplicates = [] | [{
8229
+ "prefer-inline"?: boolean;
8230
+ }];
8172
8231
  // ----- indent -----
8173
8232
  type Indent = [] | [("tab" | number)] | [("tab" | number), {
8174
8233
  SwitchCase?: number;
@@ -10251,7 +10310,7 @@ type PerfectionistSortArrayIncludes = {
10251
10310
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10252
10311
  groupKind?: ("mixed" | "literals-first" | "spreads-first");
10253
10312
  customGroups?: ({
10254
- newlinesInside?: ("always" | "never");
10313
+ newlinesInside?: (("always" | "never") | number);
10255
10314
  fallbackSort?: {
10256
10315
  order?: ("asc" | "desc");
10257
10316
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10270,7 +10329,7 @@ type PerfectionistSortArrayIncludes = {
10270
10329
  } | string));
10271
10330
  }[];
10272
10331
  } | {
10273
- newlinesInside?: ("always" | "never");
10332
+ newlinesInside?: (("always" | "never") | number);
10274
10333
  fallbackSort?: {
10275
10334
  order?: ("asc" | "desc");
10276
10335
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10319,9 +10378,9 @@ type PerfectionistSortArrayIncludes = {
10319
10378
  } | string)));
10320
10379
  });
10321
10380
  partitionByNewLine?: boolean;
10322
- newlinesBetween?: ("ignore" | "always" | "never");
10381
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10323
10382
  groups?: (string | string[] | {
10324
- newlinesBetween?: ("ignore" | "always" | "never");
10383
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10325
10384
  commentAbove?: string;
10326
10385
  })[];
10327
10386
  }[];
@@ -10338,7 +10397,7 @@ type PerfectionistSortClasses = [] | [{
10338
10397
  order?: ("asc" | "desc");
10339
10398
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10340
10399
  customGroups?: ({
10341
- newlinesInside?: ("always" | "never");
10400
+ newlinesInside?: (("always" | "never") | number);
10342
10401
  fallbackSort?: {
10343
10402
  order?: ("asc" | "desc");
10344
10403
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10372,7 +10431,7 @@ type PerfectionistSortClasses = [] | [{
10372
10431
  } | string));
10373
10432
  }[];
10374
10433
  } | {
10375
- newlinesInside?: ("always" | "never");
10434
+ newlinesInside?: (("always" | "never") | number);
10376
10435
  fallbackSort?: {
10377
10436
  order?: ("asc" | "desc");
10378
10437
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10434,9 +10493,9 @@ type PerfectionistSortClasses = [] | [{
10434
10493
  } | string)));
10435
10494
  });
10436
10495
  partitionByNewLine?: boolean;
10437
- newlinesBetween?: ("ignore" | "always" | "never");
10496
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10438
10497
  groups?: (string | string[] | {
10439
- newlinesBetween?: ("ignore" | "always" | "never");
10498
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10440
10499
  commentAbove?: string;
10441
10500
  })[];
10442
10501
  }];
@@ -10483,7 +10542,7 @@ type PerfectionistSortDecorators = [] | [{
10483
10542
  [k: string]: (string | string[]) | undefined;
10484
10543
  };
10485
10544
  groups?: (string | string[] | {
10486
- newlinesBetween?: ("ignore" | "always" | "never");
10545
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10487
10546
  commentAbove?: string;
10488
10547
  })[];
10489
10548
  }];
@@ -10502,7 +10561,7 @@ type PerfectionistSortEnums = [] | [{
10502
10561
  customGroups?: ({
10503
10562
  [k: string]: (string | string[]) | undefined;
10504
10563
  } | ({
10505
- newlinesInside?: ("always" | "never");
10564
+ newlinesInside?: (("always" | "never") | number);
10506
10565
  fallbackSort?: {
10507
10566
  order?: ("asc" | "desc");
10508
10567
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10527,7 +10586,7 @@ type PerfectionistSortEnums = [] | [{
10527
10586
  } | string));
10528
10587
  }[];
10529
10588
  } | {
10530
- newlinesInside?: ("always" | "never");
10589
+ newlinesInside?: (("always" | "never") | number);
10531
10590
  fallbackSort?: {
10532
10591
  order?: ("asc" | "desc");
10533
10592
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10575,9 +10634,9 @@ type PerfectionistSortEnums = [] | [{
10575
10634
  } | string)));
10576
10635
  });
10577
10636
  partitionByNewLine?: boolean;
10578
- newlinesBetween?: ("ignore" | "always" | "never");
10637
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10579
10638
  groups?: (string | string[] | {
10580
- newlinesBetween?: ("ignore" | "always" | "never");
10639
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10581
10640
  commentAbove?: string;
10582
10641
  })[];
10583
10642
  }];
@@ -10595,7 +10654,7 @@ type PerfectionistSortExports = {
10595
10654
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10596
10655
  groupKind?: ("mixed" | "values-first" | "types-first");
10597
10656
  customGroups?: ({
10598
- newlinesInside?: ("always" | "never");
10657
+ newlinesInside?: (("always" | "never") | number);
10599
10658
  fallbackSort?: {
10600
10659
  order?: ("asc" | "desc");
10601
10660
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10615,7 +10674,7 @@ type PerfectionistSortExports = {
10615
10674
  } | string));
10616
10675
  }[];
10617
10676
  } | {
10618
- newlinesInside?: ("always" | "never");
10677
+ newlinesInside?: (("always" | "never") | number);
10619
10678
  fallbackSort?: {
10620
10679
  order?: ("asc" | "desc");
10621
10680
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10656,9 +10715,9 @@ type PerfectionistSortExports = {
10656
10715
  } | string)));
10657
10716
  });
10658
10717
  partitionByNewLine?: boolean;
10659
- newlinesBetween?: ("ignore" | "always" | "never");
10718
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10660
10719
  groups?: (string | string[] | {
10661
- newlinesBetween?: ("ignore" | "always" | "never");
10720
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10662
10721
  commentAbove?: string;
10663
10722
  })[];
10664
10723
  }[];
@@ -10678,7 +10737,7 @@ type PerfectionistSortHeritageClauses = [] | [{
10678
10737
  [k: string]: (string | string[]) | undefined;
10679
10738
  };
10680
10739
  groups?: (string | string[] | {
10681
- newlinesBetween?: ("ignore" | "always" | "never");
10740
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10682
10741
  commentAbove?: string;
10683
10742
  })[];
10684
10743
  }];
@@ -10702,7 +10761,7 @@ type PerfectionistSortImports = {
10702
10761
  [k: string]: (string | string[]) | undefined;
10703
10762
  };
10704
10763
  } | ({
10705
- newlinesInside?: ("always" | "never");
10764
+ newlinesInside?: (("always" | "never") | number);
10706
10765
  fallbackSort?: {
10707
10766
  order?: ("asc" | "desc");
10708
10767
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10729,7 +10788,7 @@ type PerfectionistSortImports = {
10729
10788
  } | string));
10730
10789
  }[];
10731
10790
  } | {
10732
- newlinesInside?: ("always" | "never");
10791
+ newlinesInside?: (("always" | "never") | number);
10733
10792
  fallbackSort?: {
10734
10793
  order?: ("asc" | "desc");
10735
10794
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10785,7 +10844,7 @@ type PerfectionistSortImports = {
10785
10844
  } | string)));
10786
10845
  });
10787
10846
  partitionByNewLine?: boolean;
10788
- newlinesBetween?: ("ignore" | "always" | "never");
10847
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10789
10848
  internalPattern?: (({
10790
10849
  pattern: string;
10791
10850
  flags?: string;
@@ -10794,7 +10853,7 @@ type PerfectionistSortImports = {
10794
10853
  flags?: string;
10795
10854
  } | string));
10796
10855
  groups?: (string | string[] | {
10797
- newlinesBetween?: ("ignore" | "always" | "never");
10856
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10798
10857
  commentAbove?: string;
10799
10858
  })[];
10800
10859
  }[];
@@ -10814,7 +10873,7 @@ type PerfectionistSortInterfaces = {
10814
10873
  customGroups?: ({
10815
10874
  [k: string]: (string | string[]) | undefined;
10816
10875
  } | ({
10817
- newlinesInside?: ("always" | "never");
10876
+ newlinesInside?: (("always" | "never") | number);
10818
10877
  fallbackSort?: {
10819
10878
  order?: ("asc" | "desc");
10820
10879
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10843,7 +10902,7 @@ type PerfectionistSortInterfaces = {
10843
10902
  sortBy?: ("name" | "value");
10844
10903
  }[];
10845
10904
  } | {
10846
- newlinesInside?: ("always" | "never");
10905
+ newlinesInside?: (("always" | "never") | number);
10847
10906
  fallbackSort?: {
10848
10907
  order?: ("asc" | "desc");
10849
10908
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10910,7 +10969,7 @@ type PerfectionistSortInterfaces = {
10910
10969
  } | string)));
10911
10970
  });
10912
10971
  partitionByNewLine?: boolean;
10913
- newlinesBetween?: ("ignore" | "always" | "never");
10972
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10914
10973
  ignorePattern?: (({
10915
10974
  pattern: string;
10916
10975
  flags?: string;
@@ -10920,7 +10979,7 @@ type PerfectionistSortInterfaces = {
10920
10979
  } | string));
10921
10980
  sortBy?: ("name" | "value");
10922
10981
  groups?: (string | string[] | {
10923
- newlinesBetween?: ("ignore" | "always" | "never");
10982
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
10924
10983
  commentAbove?: string;
10925
10984
  })[];
10926
10985
  }[];
@@ -10937,7 +10996,7 @@ type PerfectionistSortIntersectionTypes = {
10937
10996
  order?: ("asc" | "desc");
10938
10997
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10939
10998
  customGroups?: ({
10940
- newlinesInside?: ("always" | "never");
10999
+ newlinesInside?: (("always" | "never") | number);
10941
11000
  fallbackSort?: {
10942
11001
  order?: ("asc" | "desc");
10943
11002
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10956,7 +11015,7 @@ type PerfectionistSortIntersectionTypes = {
10956
11015
  } | string));
10957
11016
  }[];
10958
11017
  } | {
10959
- newlinesInside?: ("always" | "never");
11018
+ newlinesInside?: (("always" | "never") | number);
10960
11019
  fallbackSort?: {
10961
11020
  order?: ("asc" | "desc");
10962
11021
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -10996,9 +11055,9 @@ type PerfectionistSortIntersectionTypes = {
10996
11055
  } | string)));
10997
11056
  });
10998
11057
  partitionByNewLine?: boolean;
10999
- newlinesBetween?: ("ignore" | "always" | "never");
11058
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11000
11059
  groups?: (string | string[] | {
11001
- newlinesBetween?: ("ignore" | "always" | "never");
11060
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11002
11061
  commentAbove?: string;
11003
11062
  })[];
11004
11063
  }[];
@@ -11017,7 +11076,7 @@ type PerfectionistSortJsxProps = {
11017
11076
  customGroups?: ({
11018
11077
  [k: string]: (string | string[]) | undefined;
11019
11078
  } | ({
11020
- newlinesInside?: ("always" | "never");
11079
+ newlinesInside?: (("always" | "never") | number);
11021
11080
  fallbackSort?: {
11022
11081
  order?: ("asc" | "desc");
11023
11082
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11044,7 +11103,7 @@ type PerfectionistSortJsxProps = {
11044
11103
  } | string));
11045
11104
  }[];
11046
11105
  } | {
11047
- newlinesInside?: ("always" | "never");
11106
+ newlinesInside?: (("always" | "never") | number);
11048
11107
  fallbackSort?: {
11049
11108
  order?: ("asc" | "desc");
11050
11109
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11086,7 +11145,7 @@ type PerfectionistSortJsxProps = {
11086
11145
  } | string));
11087
11146
  };
11088
11147
  partitionByNewLine?: boolean;
11089
- newlinesBetween?: ("ignore" | "always" | "never");
11148
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11090
11149
  ignorePattern?: (({
11091
11150
  pattern: string;
11092
11151
  flags?: string;
@@ -11095,7 +11154,7 @@ type PerfectionistSortJsxProps = {
11095
11154
  flags?: string;
11096
11155
  } | string));
11097
11156
  groups?: (string | string[] | {
11098
- newlinesBetween?: ("ignore" | "always" | "never");
11157
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11099
11158
  commentAbove?: string;
11100
11159
  })[];
11101
11160
  }[];
@@ -11112,7 +11171,7 @@ type PerfectionistSortMaps = {
11112
11171
  order?: ("asc" | "desc");
11113
11172
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11114
11173
  customGroups?: ({
11115
- newlinesInside?: ("always" | "never");
11174
+ newlinesInside?: (("always" | "never") | number);
11116
11175
  fallbackSort?: {
11117
11176
  order?: ("asc" | "desc");
11118
11177
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11130,7 +11189,7 @@ type PerfectionistSortMaps = {
11130
11189
  } | string));
11131
11190
  }[];
11132
11191
  } | {
11133
- newlinesInside?: ("always" | "never");
11192
+ newlinesInside?: (("always" | "never") | number);
11134
11193
  fallbackSort?: {
11135
11194
  order?: ("asc" | "desc");
11136
11195
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11178,9 +11237,9 @@ type PerfectionistSortMaps = {
11178
11237
  } | string)));
11179
11238
  });
11180
11239
  partitionByNewLine?: boolean;
11181
- newlinesBetween?: ("ignore" | "always" | "never");
11240
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11182
11241
  groups?: (string | string[] | {
11183
- newlinesBetween?: ("ignore" | "always" | "never");
11242
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11184
11243
  commentAbove?: string;
11185
11244
  })[];
11186
11245
  }[];
@@ -11197,7 +11256,7 @@ type PerfectionistSortModules = [] | [{
11197
11256
  order?: ("asc" | "desc");
11198
11257
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11199
11258
  customGroups?: ({
11200
- newlinesInside?: ("always" | "never");
11259
+ newlinesInside?: (("always" | "never") | number);
11201
11260
  fallbackSort?: {
11202
11261
  order?: ("asc" | "desc");
11203
11262
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11224,7 +11283,7 @@ type PerfectionistSortModules = [] | [{
11224
11283
  } | string));
11225
11284
  }[];
11226
11285
  } | {
11227
- newlinesInside?: ("always" | "never");
11286
+ newlinesInside?: (("always" | "never") | number);
11228
11287
  fallbackSort?: {
11229
11288
  order?: ("asc" | "desc");
11230
11289
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11272,9 +11331,9 @@ type PerfectionistSortModules = [] | [{
11272
11331
  } | string)));
11273
11332
  });
11274
11333
  partitionByNewLine?: boolean;
11275
- newlinesBetween?: ("ignore" | "always" | "never");
11334
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11276
11335
  groups?: (string | string[] | {
11277
- newlinesBetween?: ("ignore" | "always" | "never");
11336
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11278
11337
  commentAbove?: string;
11279
11338
  })[];
11280
11339
  }];
@@ -11293,7 +11352,7 @@ type PerfectionistSortNamedExports = {
11293
11352
  groupKind?: ("mixed" | "values-first" | "types-first");
11294
11353
  ignoreAlias?: boolean;
11295
11354
  customGroups?: ({
11296
- newlinesInside?: ("always" | "never");
11355
+ newlinesInside?: (("always" | "never") | number);
11297
11356
  fallbackSort?: {
11298
11357
  order?: ("asc" | "desc");
11299
11358
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11313,7 +11372,7 @@ type PerfectionistSortNamedExports = {
11313
11372
  } | string));
11314
11373
  }[];
11315
11374
  } | {
11316
- newlinesInside?: ("always" | "never");
11375
+ newlinesInside?: (("always" | "never") | number);
11317
11376
  fallbackSort?: {
11318
11377
  order?: ("asc" | "desc");
11319
11378
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11354,9 +11413,9 @@ type PerfectionistSortNamedExports = {
11354
11413
  } | string)));
11355
11414
  });
11356
11415
  partitionByNewLine?: boolean;
11357
- newlinesBetween?: ("ignore" | "always" | "never");
11416
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11358
11417
  groups?: (string | string[] | {
11359
- newlinesBetween?: ("ignore" | "always" | "never");
11418
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11360
11419
  commentAbove?: string;
11361
11420
  })[];
11362
11421
  }[];
@@ -11375,7 +11434,7 @@ type PerfectionistSortNamedImports = {
11375
11434
  groupKind?: ("mixed" | "values-first" | "types-first");
11376
11435
  ignoreAlias?: boolean;
11377
11436
  customGroups?: ({
11378
- newlinesInside?: ("always" | "never");
11437
+ newlinesInside?: (("always" | "never") | number);
11379
11438
  fallbackSort?: {
11380
11439
  order?: ("asc" | "desc");
11381
11440
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11395,7 +11454,7 @@ type PerfectionistSortNamedImports = {
11395
11454
  } | string));
11396
11455
  }[];
11397
11456
  } | {
11398
- newlinesInside?: ("always" | "never");
11457
+ newlinesInside?: (("always" | "never") | number);
11399
11458
  fallbackSort?: {
11400
11459
  order?: ("asc" | "desc");
11401
11460
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11436,9 +11495,9 @@ type PerfectionistSortNamedImports = {
11436
11495
  } | string)));
11437
11496
  });
11438
11497
  partitionByNewLine?: boolean;
11439
- newlinesBetween?: ("ignore" | "always" | "never");
11498
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11440
11499
  groups?: (string | string[] | {
11441
- newlinesBetween?: ("ignore" | "always" | "never");
11500
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11442
11501
  commentAbove?: string;
11443
11502
  })[];
11444
11503
  }[];
@@ -11458,7 +11517,7 @@ type PerfectionistSortObjectTypes = {
11458
11517
  customGroups?: ({
11459
11518
  [k: string]: (string | string[]) | undefined;
11460
11519
  } | ({
11461
- newlinesInside?: ("always" | "never");
11520
+ newlinesInside?: (("always" | "never") | number);
11462
11521
  fallbackSort?: {
11463
11522
  order?: ("asc" | "desc");
11464
11523
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11487,7 +11546,7 @@ type PerfectionistSortObjectTypes = {
11487
11546
  sortBy?: ("name" | "value");
11488
11547
  }[];
11489
11548
  } | {
11490
- newlinesInside?: ("always" | "never");
11549
+ newlinesInside?: (("always" | "never") | number);
11491
11550
  fallbackSort?: {
11492
11551
  order?: ("asc" | "desc");
11493
11552
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11554,7 +11613,7 @@ type PerfectionistSortObjectTypes = {
11554
11613
  } | string)));
11555
11614
  });
11556
11615
  partitionByNewLine?: boolean;
11557
- newlinesBetween?: ("ignore" | "always" | "never");
11616
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11558
11617
  ignorePattern?: (({
11559
11618
  pattern: string;
11560
11619
  flags?: string;
@@ -11564,7 +11623,7 @@ type PerfectionistSortObjectTypes = {
11564
11623
  } | string));
11565
11624
  sortBy?: ("name" | "value");
11566
11625
  groups?: (string | string[] | {
11567
- newlinesBetween?: ("ignore" | "always" | "never");
11626
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11568
11627
  commentAbove?: string;
11569
11628
  })[];
11570
11629
  }[];
@@ -11586,7 +11645,7 @@ type PerfectionistSortObjects = {
11586
11645
  customGroups?: ({
11587
11646
  [k: string]: (string | string[]) | undefined;
11588
11647
  } | ({
11589
- newlinesInside?: ("always" | "never");
11648
+ newlinesInside?: (("always" | "never") | number);
11590
11649
  fallbackSort?: {
11591
11650
  order?: ("asc" | "desc");
11592
11651
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11613,7 +11672,7 @@ type PerfectionistSortObjects = {
11613
11672
  } | string));
11614
11673
  }[];
11615
11674
  } | {
11616
- newlinesInside?: ("always" | "never");
11675
+ newlinesInside?: (("always" | "never") | number);
11617
11676
  fallbackSort?: {
11618
11677
  order?: ("asc" | "desc");
11619
11678
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11680,7 +11739,7 @@ type PerfectionistSortObjects = {
11680
11739
  } | string)));
11681
11740
  });
11682
11741
  partitionByNewLine?: boolean;
11683
- newlinesBetween?: ("ignore" | "always" | "never");
11742
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11684
11743
  ignorePattern?: (({
11685
11744
  pattern: string;
11686
11745
  flags?: string;
@@ -11689,7 +11748,7 @@ type PerfectionistSortObjects = {
11689
11748
  flags?: string;
11690
11749
  } | string));
11691
11750
  groups?: (string | string[] | {
11692
- newlinesBetween?: ("ignore" | "always" | "never");
11751
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11693
11752
  commentAbove?: string;
11694
11753
  })[];
11695
11754
  }[];
@@ -11707,7 +11766,7 @@ type PerfectionistSortSets = {
11707
11766
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11708
11767
  groupKind?: ("mixed" | "literals-first" | "spreads-first");
11709
11768
  customGroups?: ({
11710
- newlinesInside?: ("always" | "never");
11769
+ newlinesInside?: (("always" | "never") | number);
11711
11770
  fallbackSort?: {
11712
11771
  order?: ("asc" | "desc");
11713
11772
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11726,7 +11785,7 @@ type PerfectionistSortSets = {
11726
11785
  } | string));
11727
11786
  }[];
11728
11787
  } | {
11729
- newlinesInside?: ("always" | "never");
11788
+ newlinesInside?: (("always" | "never") | number);
11730
11789
  fallbackSort?: {
11731
11790
  order?: ("asc" | "desc");
11732
11791
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11775,9 +11834,9 @@ type PerfectionistSortSets = {
11775
11834
  } | string)));
11776
11835
  });
11777
11836
  partitionByNewLine?: boolean;
11778
- newlinesBetween?: ("ignore" | "always" | "never");
11837
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11779
11838
  groups?: (string | string[] | {
11780
- newlinesBetween?: ("ignore" | "always" | "never");
11839
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11781
11840
  commentAbove?: string;
11782
11841
  })[];
11783
11842
  }[];
@@ -11807,7 +11866,7 @@ type PerfectionistSortUnionTypes = {
11807
11866
  order?: ("asc" | "desc");
11808
11867
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11809
11868
  customGroups?: ({
11810
- newlinesInside?: ("always" | "never");
11869
+ newlinesInside?: (("always" | "never") | number);
11811
11870
  fallbackSort?: {
11812
11871
  order?: ("asc" | "desc");
11813
11872
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11826,7 +11885,7 @@ type PerfectionistSortUnionTypes = {
11826
11885
  } | string));
11827
11886
  }[];
11828
11887
  } | {
11829
- newlinesInside?: ("always" | "never");
11888
+ newlinesInside?: (("always" | "never") | number);
11830
11889
  fallbackSort?: {
11831
11890
  order?: ("asc" | "desc");
11832
11891
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11866,9 +11925,9 @@ type PerfectionistSortUnionTypes = {
11866
11925
  } | string)));
11867
11926
  });
11868
11927
  partitionByNewLine?: boolean;
11869
- newlinesBetween?: ("ignore" | "always" | "never");
11928
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11870
11929
  groups?: (string | string[] | {
11871
- newlinesBetween?: ("ignore" | "always" | "never");
11930
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11872
11931
  commentAbove?: string;
11873
11932
  })[];
11874
11933
  }[];
@@ -11885,7 +11944,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
11885
11944
  order?: ("asc" | "desc");
11886
11945
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11887
11946
  customGroups?: ({
11888
- newlinesInside?: ("always" | "never");
11947
+ newlinesInside?: (("always" | "never") | number);
11889
11948
  fallbackSort?: {
11890
11949
  order?: ("asc" | "desc");
11891
11950
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11904,7 +11963,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
11904
11963
  } | string));
11905
11964
  }[];
11906
11965
  } | {
11907
- newlinesInside?: ("always" | "never");
11966
+ newlinesInside?: (("always" | "never") | number);
11908
11967
  fallbackSort?: {
11909
11968
  order?: ("asc" | "desc");
11910
11969
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
@@ -11944,9 +12003,9 @@ type PerfectionistSortVariableDeclarations = [] | [{
11944
12003
  } | string)));
11945
12004
  });
11946
12005
  partitionByNewLine?: boolean;
11947
- newlinesBetween?: ("ignore" | "always" | "never");
12006
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11948
12007
  groups?: (string | string[] | {
11949
- newlinesBetween?: ("ignore" | "always" | "never");
12008
+ newlinesBetween?: (("ignore" | "always" | "never") | number);
11950
12009
  commentAbove?: string;
11951
12010
  })[];
11952
12011
  }];
@@ -12496,14 +12555,6 @@ type StyleCurlyNewline = [] | [(("always" | "never") | {
12496
12555
  type StyleDotLocation = [] | [("object" | "property")];
12497
12556
  // ----- style/eol-last -----
12498
12557
  type StyleEolLast = [] | [("always" | "never" | "unix" | "windows")];
12499
- // ----- style/func-call-spacing -----
12500
- type StyleFuncCallSpacing = ([] | ["never"] | [] | ["always"] | ["always", {
12501
- allowNewlines?: boolean;
12502
- optionalChain?: {
12503
- before?: boolean;
12504
- after?: boolean;
12505
- };
12506
- }]);
12507
12558
  // ----- style/function-call-argument-newline -----
12508
12559
  type StyleFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
12509
12560
  // ----- style/function-call-spacing -----
@@ -13226,6 +13277,11 @@ type StyleNoExtraParens = ([] | ["functions"] | [] | ["all"] | ["all", {
13226
13277
  enforceForFunctionPrototypeMethods?: boolean;
13227
13278
  allowParensAfterCommentPattern?: string;
13228
13279
  nestedConditionalExpressions?: boolean;
13280
+ allowNodesInSpreadElement?: {
13281
+ ConditionalExpression?: boolean;
13282
+ LogicalExpression?: boolean;
13283
+ AwaitExpression?: boolean;
13284
+ };
13229
13285
  }]);
13230
13286
  // ----- style/no-mixed-operators -----
13231
13287
  type StyleNoMixedOperators = [] | [{
@@ -13312,7 +13368,6 @@ type StyleObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never
13312
13368
  // ----- style/object-property-newline -----
13313
13369
  type StyleObjectPropertyNewline = [] | [{
13314
13370
  allowAllPropertiesOnSameLine?: boolean;
13315
- allowMultiplePropertiesPerLine?: boolean;
13316
13371
  }];
13317
13372
  // ----- style/one-var-declaration-per-line -----
13318
13373
  type StyleOneVarDeclarationPerLine = [] | [("always" | "initializations")];
@@ -13381,6 +13436,7 @@ type StyleSpaceBeforeFunctionParen = [] | [(("always" | "never") | {
13381
13436
  anonymous?: ("always" | "never" | "ignore");
13382
13437
  named?: ("always" | "never" | "ignore");
13383
13438
  asyncArrow?: ("always" | "never" | "ignore");
13439
+ catch?: ("always" | "never" | "ignore");
13384
13440
  })];
13385
13441
  // ----- style/space-in-parens -----
13386
13442
  type StyleSpaceInParens = [] | [("always" | "never")] | [("always" | "never"), {
@@ -13658,6 +13714,10 @@ type TestConsistentTestIt = [] | [{
13658
13714
  fn?: ("test" | "it");
13659
13715
  withinDescribe?: ("test" | "it");
13660
13716
  }];
13717
+ // ----- test/consistent-vitest-vi -----
13718
+ type TestConsistentVitestVi = [] | [{
13719
+ fn?: ("vi" | "vitest");
13720
+ }];
13661
13721
  // ----- test/expect-expect -----
13662
13722
  type TestExpectExpect = [] | [{
13663
13723
  assertFunctionNames?: string[];
@@ -16824,6 +16884,12 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
16824
16884
  * @default true
16825
16885
  */
16826
16886
  unicorn?: boolean | OptionsUnicorn;
16887
+ /**
16888
+ * Options for eslint-plugin-import-lite.
16889
+ *
16890
+ * @default true
16891
+ */
16892
+ imports?: boolean | OptionsOverrides;
16827
16893
  /**
16828
16894
  * Enable test support.
16829
16895
  *
@@ -16987,6 +17053,7 @@ declare const defaultPluginRenaming: {
16987
17053
  '@eslint-react/naming-convention': string;
16988
17054
  '@stylistic': string;
16989
17055
  '@typescript-eslint': string;
17056
+ 'import-lite': string;
16990
17057
  n: string;
16991
17058
  vitest: string;
16992
17059
  yml: string;
@@ -17025,7 +17092,7 @@ declare function formatters(options?: OptionsFormatters | true, stylistic?: Styl
17025
17092
  declare function ignores(userIgnores?: string[]): Promise<TypedFlatConfigItem[]>;
17026
17093
  //#endregion
17027
17094
  //#region src/configs/imports.d.ts
17028
- declare function imports(_options?: OptionsStylistic): Promise<TypedFlatConfigItem[]>;
17095
+ declare function imports(options?: OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
17029
17096
  //#endregion
17030
17097
  //#region src/configs/javascript.d.ts
17031
17098
  declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
@@ -17201,7 +17268,7 @@ declare function renameRules(rules: Record<string, any>, map: Record<string, str
17201
17268
  *
17202
17269
  * export default renamePluginInConfigs(someConfigs, {
17203
17270
  * '@typescript-eslint': 'ts',
17204
- * 'import-x': 'import',
17271
+ * '@stylistic': 'style',
17205
17272
  * })
17206
17273
  * ```
17207
17274
  */
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import { fileURLToPath } from "node:url";
5
5
  import createCommand from "eslint-plugin-command/config";
6
6
  import pluginComments from "@eslint-community/eslint-plugin-eslint-comments";
7
7
  import pluginAntfu from "eslint-plugin-antfu";
8
+ import pluginImportLite from "eslint-plugin-import-lite";
8
9
  import pluginNode from "eslint-plugin-n";
9
10
  import pluginPerfectionist from "eslint-plugin-perfectionist";
10
11
  import pluginUnicorn from "eslint-plugin-unicorn";
@@ -158,7 +159,7 @@ function renameRules(rules, map) {
158
159
  *
159
160
  * export default renamePluginInConfigs(someConfigs, {
160
161
  * '@typescript-eslint': 'ts',
161
- * 'import-x': 'import',
162
+ * '@stylistic': 'style',
162
163
  * })
163
164
  * ```
164
165
  */
@@ -306,7 +307,6 @@ async function disables() {
306
307
  name: "antfu/disables/dts",
307
308
  rules: {
308
309
  "eslint-comments/no-unlimited-disable": "off",
309
- "import/no-duplicates": "off",
310
310
  "no-restricted-syntax": "off",
311
311
  "unused-imports/no-unused-vars": "off"
312
312
  }
@@ -368,19 +368,6 @@ async function stylistic(options = {}) {
368
368
  after: true,
369
369
  before: false
370
370
  }],
371
- "style/padding-line-between-statements": [
372
- "error",
373
- {
374
- blankLine: "always",
375
- next: "*",
376
- prev: "import"
377
- },
378
- {
379
- blankLine: "any",
380
- next: "import",
381
- prev: "import"
382
- }
383
- ],
384
371
  "style/yield-star-spacing": ["error", {
385
372
  after: true,
386
373
  before: false
@@ -566,14 +553,25 @@ async function ignores(userIgnores = []) {
566
553
 
567
554
  //#endregion
568
555
  //#region src/configs/imports.ts
569
- async function imports(_options = {}) {
556
+ async function imports(options = {}) {
557
+ const { overrides = {}, stylistic: stylistic$1 = true } = options;
570
558
  return [{
571
559
  name: "antfu/imports/rules",
572
- plugins: { antfu: pluginAntfu },
560
+ plugins: {
561
+ antfu: pluginAntfu,
562
+ import: pluginImportLite
563
+ },
573
564
  rules: {
574
565
  "antfu/import-dedupe": "error",
575
566
  "antfu/no-import-dist": "error",
576
- "antfu/no-import-node-modules-by-path": "error"
567
+ "antfu/no-import-node-modules-by-path": "error",
568
+ "import/consistent-type-specifier-style": ["error", "top-level"],
569
+ "import/first": "error",
570
+ "import/no-duplicates": "error",
571
+ "import/no-mutable-exports": "error",
572
+ "import/no-named-default": "error",
573
+ ...stylistic$1 ? { "import/newline-after-import": ["error", { count: 1 }] } : {},
574
+ ...overrides
577
575
  }
578
576
  }];
579
577
  }
@@ -892,7 +890,7 @@ async function jsonc(options = {}) {
892
890
  multiline: true
893
891
  }],
894
892
  "jsonc/object-curly-spacing": ["error", "always"],
895
- "jsonc/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
893
+ "jsonc/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
896
894
  "jsonc/quote-props": "error",
897
895
  "jsonc/quotes": "error"
898
896
  } : {},
@@ -938,7 +936,6 @@ async function markdown(options = {}) {
938
936
  name: "antfu/markdown/disables",
939
937
  rules: {
940
938
  "antfu/no-top-level-await": "off",
941
- "import/newline-after-import": "off",
942
939
  "no-alert": "off",
943
940
  "no-console": "off",
944
941
  "no-labels": "off",
@@ -951,6 +948,7 @@ async function markdown(options = {}) {
951
948
  "node/prefer-global/process": "off",
952
949
  "style/comma-dangle": "off",
953
950
  "style/eol-last": "off",
951
+ "style/padding-line-between-statements": "off",
954
952
  "ts/consistent-type-imports": "off",
955
953
  "ts/explicit-function-return-type": "off",
956
954
  "ts/no-namespace": "off",
@@ -1541,7 +1539,6 @@ async function svelte(options = {}) {
1541
1539
  name: "antfu/svelte/rules",
1542
1540
  processor: pluginSvelte.processors[".svelte"],
1543
1541
  rules: {
1544
- "import/no-mutable-exports": "off",
1545
1542
  "no-undef": "off",
1546
1543
  "no-unused-vars": ["error", {
1547
1544
  args: "none",
@@ -2026,7 +2023,7 @@ async function vue(options = {}) {
2026
2023
  }],
2027
2024
  "vue/object-curly-newline": "off",
2028
2025
  "vue/object-curly-spacing": ["error", "always"],
2029
- "vue/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
2026
+ "vue/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
2030
2027
  "vue/operator-linebreak": ["error", "before"],
2031
2028
  "vue/padding-line-between-blocks": ["error", "always"],
2032
2029
  "vue/quote-props": ["error", "consistent-as-needed"],
@@ -2165,6 +2162,7 @@ const defaultPluginRenaming = {
2165
2162
  "@eslint-react/naming-convention": "react-naming-convention",
2166
2163
  "@stylistic": "style",
2167
2164
  "@typescript-eslint": "ts",
2165
+ "import-lite": "import",
2168
2166
  "n": "node",
2169
2167
  "vitest": "test",
2170
2168
  "yml": "yaml"
@@ -2180,7 +2178,7 @@ const defaultPluginRenaming = {
2180
2178
  * The merged ESLint configurations.
2181
2179
  */
2182
2180
  function antfu(options = {}, ...userConfigs) {
2183
- const { astro: enableAstro = false, autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, jsx: enableJsx = true, pnpm: enableCatalogs = false, react: enableReact = false, regexp: enableRegexp = true, solid: enableSolid = false, svelte: enableSvelte = false, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = false, vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
2181
+ const { astro: enableAstro = false, autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, jsx: enableJsx = true, pnpm: enableCatalogs = false, react: enableReact = false, regexp: enableRegexp = true, solid: enableSolid = false, svelte: enableSvelte = false, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = false, vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
2184
2182
  let isInEditor = options.isInEditor;
2185
2183
  if (isInEditor == null) {
2186
2184
  isInEditor = isInEditorEnv();
@@ -2203,6 +2201,10 @@ function antfu(options = {}, ...userConfigs) {
2203
2201
  isInEditor,
2204
2202
  overrides: getOverrides(options, "javascript")
2205
2203
  }), comments(), node(), jsdoc({ stylistic: stylisticOptions }), imports({ stylistic: stylisticOptions }), command(), perfectionist());
2204
+ if (enableImports) configs$1.push(imports(enableImports === true ? { stylistic: stylisticOptions } : {
2205
+ stylistic: stylisticOptions,
2206
+ ...enableImports
2207
+ }));
2206
2208
  if (enableUnicorn) configs$1.push(unicorn(enableUnicorn === true ? {} : enableUnicorn));
2207
2209
  if (enableVue) componentExts.push("vue");
2208
2210
  if (enableJsx) configs$1.push(jsx());
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "4.14.0",
4
+ "version": "4.15.0",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -93,10 +93,10 @@
93
93
  "@clack/prompts": "^0.11.0",
94
94
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
95
95
  "@eslint/markdown": "^6.5.0",
96
- "@stylistic/eslint-plugin": "^5.0.0-beta.1",
97
- "@typescript-eslint/eslint-plugin": "^8.33.1",
98
- "@typescript-eslint/parser": "^8.33.1",
99
- "@vitest/eslint-plugin": "^1.2.1",
96
+ "@stylistic/eslint-plugin": "^5.0.0-beta.4",
97
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
98
+ "@typescript-eslint/parser": "^8.34.1",
99
+ "@vitest/eslint-plugin": "^1.2.7",
100
100
  "ansis": "^4.1.0",
101
101
  "cac": "^6.7.14",
102
102
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -104,13 +104,14 @@
104
104
  "eslint-merge-processors": "^2.0.0",
105
105
  "eslint-plugin-antfu": "^3.1.1",
106
106
  "eslint-plugin-command": "^3.2.1",
107
- "eslint-plugin-jsdoc": "^50.7.1",
107
+ "eslint-plugin-import-lite": "^0.3.0",
108
+ "eslint-plugin-jsdoc": "^51.0.3",
108
109
  "eslint-plugin-jsonc": "^2.20.1",
109
- "eslint-plugin-n": "^17.19.0",
110
+ "eslint-plugin-n": "^17.20.0",
110
111
  "eslint-plugin-no-only-tests": "^3.3.0",
111
- "eslint-plugin-perfectionist": "^4.14.0",
112
+ "eslint-plugin-perfectionist": "^4.15.0",
112
113
  "eslint-plugin-pnpm": "^0.3.1",
113
- "eslint-plugin-regexp": "^2.8.0",
114
+ "eslint-plugin-regexp": "^2.9.0",
114
115
  "eslint-plugin-toml": "^0.12.0",
115
116
  "eslint-plugin-unicorn": "^59.0.1",
116
117
  "eslint-plugin-unused-imports": "^4.1.4",
@@ -127,38 +128,38 @@
127
128
  },
128
129
  "devDependencies": {
129
130
  "@antfu/ni": "^25.0.0",
130
- "@eslint-react/eslint-plugin": "^1.51.1",
131
- "@eslint/config-inspector": "^1.0.2",
131
+ "@eslint-react/eslint-plugin": "^1.52.2",
132
+ "@eslint/config-inspector": "^1.1.0",
132
133
  "@prettier/plugin-xml": "^3.4.1",
133
- "@types/node": "^22.15.30",
134
- "@unocss/eslint-plugin": "^66.1.3",
134
+ "@types/node": "^24.0.3",
135
+ "@unocss/eslint-plugin": "^66.2.3",
135
136
  "astro-eslint-parser": "^1.2.2",
136
- "bumpp": "^10.1.1",
137
- "eslint": "^9.28.0",
137
+ "bumpp": "^10.2.0",
138
+ "eslint": "^9.29.0",
138
139
  "eslint-plugin-astro": "^1.3.1",
139
140
  "eslint-plugin-format": "^1.0.1",
140
141
  "eslint-plugin-react-hooks": "^5.2.0",
141
142
  "eslint-plugin-react-refresh": "^0.4.20",
142
143
  "eslint-plugin-solid": "^0.14.5",
143
- "eslint-plugin-svelte": "^3.9.1",
144
+ "eslint-plugin-svelte": "^3.9.2",
144
145
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
145
146
  "eslint-typegen": "^2.2.0",
146
147
  "execa": "^9.6.0",
147
148
  "jiti": "^2.4.2",
148
- "lint-staged": "^16.1.0",
149
+ "lint-staged": "^16.1.2",
149
150
  "pnpm-workspace-yaml": "^0.3.1",
150
151
  "prettier-plugin-astro": "^0.14.1",
151
152
  "prettier-plugin-slidev": "^1.0.5",
152
153
  "simple-git-hooks": "^2.13.0",
153
- "svelte": "^5.33.14",
154
+ "svelte": "^5.34.6",
154
155
  "svelte-eslint-parser": "^1.2.0",
155
156
  "tinyglobby": "^0.2.14",
156
- "tsdown": "^0.12.7",
157
- "tsx": "^4.19.4",
157
+ "tsdown": "^0.12.8",
158
+ "tsx": "^4.20.3",
158
159
  "typescript": "^5.8.3",
159
- "vitest": "^3.2.2",
160
- "vue": "^3.5.16",
161
- "@antfu/eslint-config": "4.14.0"
160
+ "vitest": "^3.2.4",
161
+ "vue": "^3.5.17",
162
+ "@antfu/eslint-config": "4.15.0"
162
163
  },
163
164
  "simple-git-hooks": {
164
165
  "pre-commit": "npx lint-staged"