@ntnyq/eslint-config 3.7.0 → 3.7.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/index.cjs CHANGED
@@ -1452,51 +1452,51 @@ var unocss = (options = {}) => [
1452
1452
 
1453
1453
  // src/constants.ts
1454
1454
  var DEFAULT_PRETTIER_OPTIONS = {
1455
- // Specify the number of spaces per indentation-level
1456
- tabWidth: 2,
1457
- // Use semicolons or not
1458
- semi: false,
1459
- // Format only a segment of a file.
1460
- rangeStart: 0,
1461
- // Indent lines with tabs instead of spaces
1462
- useTabs: false,
1463
- // Maximum line length
1464
- printWidth: 100,
1455
+ // Include parentheses around a sole arrow function parameter
1456
+ arrowParens: "avoid",
1457
+ // Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
1458
+ bracketSameLine: false,
1459
+ // Print spaces between brackets in object literals.
1460
+ bracketSpacing: true,
1461
+ // Control whether Prettier formats quoted code embedded in the file
1462
+ embeddedLanguageFormatting: "auto",
1465
1463
  // End of line
1466
1464
  endOfLine: "lf",
1467
- // Use single quotes instead of double quotes
1468
- singleQuote: true,
1465
+ // Specify the global whitespace sensitivity for HTML files
1466
+ htmlWhitespaceSensitivity: "css",
1469
1467
  // Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
1470
1468
  insertPragma: false,
1471
1469
  // Use single quotes instead of double quotes in JSX
1472
1470
  jsxSingleQuote: true,
1473
- // Print trailing commas wherever possible when multi-line
1474
- trailingComma: "all",
1475
- // Print spaces between brackets in object literals.
1476
- bracketSpacing: true,
1477
- // Include parentheses around a sole arrow function parameter
1478
- arrowParens: "avoid",
1479
- // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
1480
- requirePragma: false,
1481
- // Specify which parser to use.
1482
- // parser: undefined,
1483
- // Specify the file name to use to infer which parser to use.
1484
- // filepath: undefined,
1471
+ // Maximum line length
1472
+ printWidth: 100,
1485
1473
  // By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and Bitbucket.
1486
1474
  proseWrap: "preserve",
1487
- // Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
1488
- bracketSameLine: false,
1489
1475
  // Change when properties in objects are quoted
1490
1476
  quoteProps: "as-needed",
1477
+ rangeEnd: Number.POSITIVE_INFINITY,
1478
+ // Format only a segment of a file.
1479
+ rangeStart: 0,
1480
+ // Specify which parser to use.
1481
+ // parser: undefined,
1482
+ // Specify the file name to use to infer which parser to use.
1483
+ // filepath: undefined,
1484
+ // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
1485
+ requirePragma: false,
1486
+ // Use semicolons or not
1487
+ semi: false,
1491
1488
  // Enforce single attribute per line in HTML, Vue and JSX
1492
1489
  singleAttributePerLine: true,
1490
+ // Use single quotes instead of double quotes
1491
+ singleQuote: true,
1492
+ // Specify the number of spaces per indentation-level
1493
+ tabWidth: 2,
1494
+ // Print trailing commas wherever possible when multi-line
1495
+ trailingComma: "all",
1496
+ // Indent lines with tabs instead of spaces
1497
+ useTabs: false,
1493
1498
  // Whether or not to indent the code inside <script> and <style> tags in Vue files
1494
- vueIndentScriptAndStyle: false,
1495
- // Specify the global whitespace sensitivity for HTML files
1496
- htmlWhitespaceSensitivity: "css",
1497
- rangeEnd: Number.POSITIVE_INFINITY,
1498
- // Control whether Prettier formats quoted code embedded in the file
1499
- embeddedLanguageFormatting: "auto"
1499
+ vueIndentScriptAndStyle: false
1500
1500
  };
1501
1501
 
1502
1502
  // src/utils/env.ts
@@ -1845,7 +1845,7 @@ var specials = (options = {}) => [
1845
1845
  "perfectionist/sort-objects": [
1846
1846
  "error",
1847
1847
  {
1848
- type: "line-length",
1848
+ type: "alphabetical",
1849
1849
  order: "asc"
1850
1850
  }
1851
1851
  ],
@@ -2591,15 +2591,16 @@ var perfectionist = (options = {}) => {
2591
2591
  "perfectionist/sort-enums": [
2592
2592
  "error",
2593
2593
  {
2594
- type: "line-length",
2594
+ type: "alphabetical",
2595
2595
  order: "asc"
2596
2596
  }
2597
2597
  ],
2598
2598
  "perfectionist/sort-modules": [
2599
2599
  "error",
2600
2600
  {
2601
- type: "line-length",
2602
- order: "asc"
2601
+ type: "alphabetical",
2602
+ order: "asc",
2603
+ partitionByComment: true
2603
2604
  }
2604
2605
  ],
2605
2606
  // Overrides rules
@@ -2653,8 +2654,9 @@ var perfectionist = (options = {}) => {
2653
2654
  "perfectionist/sort-modules": [
2654
2655
  "error",
2655
2656
  {
2656
- type: "line-length",
2657
- order: "asc"
2657
+ type: "alphabetical",
2658
+ order: "asc",
2659
+ partitionByComment: true
2658
2660
  }
2659
2661
  ],
2660
2662
  "perfectionist/sort-object-types": [
@@ -2667,7 +2669,7 @@ var perfectionist = (options = {}) => {
2667
2669
  "perfectionist/sort-union-types": [
2668
2670
  "error",
2669
2671
  {
2670
- type: "line-length",
2672
+ type: "alphabetical",
2671
2673
  order: "asc"
2672
2674
  }
2673
2675
  ],
@@ -2694,17 +2696,25 @@ var perfectionist = (options = {}) => {
2694
2696
  "perfectionist/sort-objects": [
2695
2697
  "error",
2696
2698
  {
2697
- type: "line-length",
2699
+ type: "alphabetical",
2698
2700
  order: "asc"
2699
2701
  }
2700
2702
  ],
2701
2703
  "perfectionist/sort-sets": [
2702
2704
  "error",
2703
2705
  {
2704
- type: "line-length",
2706
+ type: "alphabetical",
2705
2707
  order: "asc"
2706
2708
  }
2707
2709
  ],
2710
+ "perfectionist/sort-modules": [
2711
+ "error",
2712
+ {
2713
+ type: "alphabetical",
2714
+ order: "asc",
2715
+ partitionByComment: true
2716
+ }
2717
+ ],
2708
2718
  // Overrides rules
2709
2719
  ...options.overridesConstantsRules
2710
2720
  }
package/dist/index.d.cts CHANGED
@@ -50,25 +50,17 @@ type Arrayable<T> = T | T[];
50
50
  /**
51
51
  * Promise or not
52
52
  */
53
- type Awaitable<T> = T | Promise<T>;
53
+ type Awaitable<T> = Promise<T> | T;
54
54
  /**
55
55
  * Make types human readable
56
56
  */
57
+ type InteropModuleDefault<T> = T extends {
58
+ default: infer U;
59
+ } ? U : T;
57
60
  type Pretty<T> = {
58
61
  [P in keyof T]: T[P];
59
62
  } & {};
60
63
  type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
61
- type InteropModuleDefault<T> = T extends {
62
- default: infer U;
63
- } ? U : T;
64
- /**
65
- * A literal type that supports custom further strings but preserves autocompletion in IDEs.
66
- *
67
- * @see https://github.com/microsoft/TypeScript/issues/29729#issuecomment-471566609
68
- */
69
- type LiteralUnion<Union extends Base, Base = string> = Union | (Base & {
70
- zz_IGNORE_ME?: never;
71
- });
72
64
 
73
65
  interface RuleOptions {
74
66
  /**
@@ -14720,88 +14712,83 @@ type ConfigIgnoresOptions = string[];
14720
14712
  /**
14721
14713
  * Options for overrides `files`
14722
14714
  */
14723
- interface OptionsFiles {
14724
- files?: string[];
14725
- }
14726
14715
  type ConfigCommandOptions = ESLintPluginCommandOptions;
14727
14716
  interface ConfigYmlOptions extends OptionsOverrides {
14728
14717
  }
14718
+ interface OptionsFiles {
14719
+ files?: string[];
14720
+ }
14729
14721
  /**
14730
14722
  * Options for add `extensions` support
14731
14723
  */
14732
- interface OptionsExtensions {
14733
- extensions?: string[];
14724
+ interface ConfigAntfuOptions extends OptionsOverrides {
14734
14725
  }
14735
- interface ConfigNodeOptions extends OptionsOverrides {
14726
+ interface ConfigCommentsOptions extends OptionsOverrides {
14736
14727
  }
14737
- interface ConfigTomlOptions extends OptionsOverrides {
14728
+ interface ConfigGitHubActionOptions extends OptionsOverrides {
14738
14729
  }
14739
- interface ConfigAntfuOptions extends OptionsOverrides {
14730
+ interface ConfigImportsOptions extends OptionsOverrides {
14740
14731
  }
14741
- interface ConfigNtnyqOptions extends OptionsOverrides {
14732
+ interface ConfigJsdocOptions extends OptionsFeatures, OptionsOverrides {
14742
14733
  }
14743
14734
  interface ConfigJsoncOptions extends OptionsOverrides {
14744
14735
  }
14745
- interface ConfigUnicornOptions extends OptionsOverrides {
14746
- }
14747
- interface ConfigImportsOptions extends OptionsOverrides {
14736
+ interface ConfigNodeOptions extends OptionsOverrides {
14748
14737
  }
14749
- interface ConfigCommentsOptions extends OptionsOverrides {
14738
+ interface ConfigNtnyqOptions extends OptionsOverrides {
14750
14739
  }
14751
14740
  interface ConfigStylisticOptions extends OptionsOverrides {
14752
14741
  }
14753
- interface ConfigGitHubActionOptions extends OptionsOverrides {
14742
+ interface ConfigTomlOptions extends OptionsOverrides {
14743
+ }
14744
+ interface ConfigUnicornOptions extends OptionsOverrides {
14754
14745
  }
14755
14746
  interface ConfigUnusedImportsOptions extends OptionsOverrides {
14756
14747
  }
14757
- interface ConfigJsdocOptions extends OptionsFeatures, OptionsOverrides {
14748
+ interface OptionsExtensions {
14749
+ extensions?: string[];
14758
14750
  }
14759
14751
  /**
14760
14752
  * Options for add `features` support
14761
14753
  */
14754
+ interface ConfigMarkdownOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14755
+ }
14762
14756
  type OptionsFeatures = {
14763
14757
  /**
14764
14758
  * Enable typescript support
14765
14759
  */
14766
14760
  typescript?: boolean;
14767
14761
  };
14768
- interface ConfigMarkdownOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14769
- }
14770
14762
  /**
14771
14763
  * Options for overrides `rules`
14772
14764
  */
14773
- interface OptionsOverrides<Rules extends TypedConfigItem['rules'] = TypedConfigItem['rules']> {
14774
- overrides?: Rules;
14775
- }
14776
- interface ConfigRegexpOptions extends OptionsOverrides {
14765
+ interface ConfigFormatOptions {
14777
14766
  /**
14778
- * Prettier level
14767
+ * Enable formatter support for css, less, scss, sass and etc.
14779
14768
  *
14780
- * @default 'error'
14769
+ * @default 'prettier'
14781
14770
  */
14782
- level?: 'warn' | 'error';
14783
- }
14784
- interface ConfigUnoCSSOptions extends OptionsOverrides {
14771
+ css?: 'prettier' | boolean;
14785
14772
  /**
14786
- * Enable attributify sort order
14773
+ * Enable formatter support for html
14787
14774
  *
14788
- * @default false
14775
+ * @default 'prettier'
14789
14776
  */
14790
- attributify?: boolean;
14791
- }
14792
- interface ConfigTestOptions extends OptionsOverrides {
14777
+ html?: 'prettier' | boolean;
14793
14778
  /**
14794
- * Overrides built-in vitest rules
14779
+ * Enable formatter support for markdown
14780
+ *
14781
+ * @default 'prettier'
14795
14782
  */
14796
- overridesVitestRules?: TypedConfigItem['rules'];
14797
- }
14798
- interface ConfigJavaScriptOptions extends OptionsOverrides {
14783
+ markdown?: 'dprint' | 'prettier' | boolean;
14799
14784
  /**
14800
- * Enable strict checking for JavaScript files
14801
- *
14802
- * @default false
14785
+ * Options for prettier
14803
14786
  */
14804
- strict?: boolean;
14787
+ prettierOptions?: PrettierOptions;
14788
+ /**
14789
+ * Options for dprint
14790
+ */
14791
+ dprintOptions?: boolean;
14805
14792
  }
14806
14793
  type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
14807
14794
  /**
@@ -14811,23 +14798,45 @@ type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
14811
14798
  */
14812
14799
  strict?: boolean;
14813
14800
  };
14814
- interface ConfigSortOptions {
14801
+ interface ConfigJavaScriptOptions extends OptionsOverrides {
14815
14802
  /**
14816
- * @default true
14803
+ * Enable strict checking for JavaScript files
14804
+ *
14805
+ * @default false
14817
14806
  */
14818
- tsconfig?: boolean;
14807
+ strict?: boolean;
14808
+ }
14809
+ interface ConfigPerfectionistOptions extends OptionsOverrides {
14819
14810
  /**
14811
+ * Enable sort `constants`
14812
+ *
14820
14813
  * @default true
14821
14814
  */
14822
- packageJson?: boolean;
14815
+ sortConstants?: boolean;
14823
14816
  /**
14817
+ * Enable sort `enums`
14818
+ *
14824
14819
  * @default true
14825
14820
  */
14826
- i18nLocale?: boolean;
14821
+ sortEnums?: boolean;
14827
14822
  /**
14823
+ * Enable sort `types`
14824
+ *
14828
14825
  * @default true
14829
14826
  */
14830
- pnpmWorkspace?: boolean;
14827
+ sortTypes?: boolean;
14828
+ /**
14829
+ * Overrides rules for `constants`
14830
+ */
14831
+ overridesConstantsRules?: TypedConfigItem['rules'];
14832
+ /**
14833
+ * Overrides rules for `enums`
14834
+ */
14835
+ overridesEnumsRules?: TypedConfigItem['rules'];
14836
+ /**
14837
+ * Overrides rules for `types`
14838
+ */
14839
+ overridesTypesRules?: TypedConfigItem['rules'];
14831
14840
  }
14832
14841
  interface ConfigPrettierOptions extends OptionsOverrides {
14833
14842
  /**
@@ -14835,7 +14844,7 @@ interface ConfigPrettierOptions extends OptionsOverrides {
14835
14844
  *
14836
14845
  * @default 'warn'
14837
14846
  */
14838
- level?: 'warn' | 'error';
14847
+ level?: 'error' | 'warn';
14839
14848
  /**
14840
14849
  * Glob of built-in disabled files
14841
14850
  */
@@ -14846,20 +14855,31 @@ interface ConfigPrettierOptions extends OptionsOverrides {
14846
14855
  */
14847
14856
  userDisabledFiles?: string[];
14848
14857
  }
14849
- interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrides {
14858
+ interface ConfigRegexpOptions extends OptionsOverrides {
14850
14859
  /**
14851
- * Create virtual files for Vue SFC blocks to enable linting.
14860
+ * Prettier level
14852
14861
  *
14853
- * @see https://github.com/antfu/eslint-processor-vue-blocks
14862
+ * @default 'error'
14863
+ */
14864
+ level?: 'error' | 'warn';
14865
+ }
14866
+ interface ConfigSortOptions {
14867
+ /**
14854
14868
  * @default true
14855
14869
  */
14856
- sfcBlocks?: boolean | Options;
14870
+ tsconfig?: boolean;
14857
14871
  /**
14858
- * Vue version
14859
- *
14860
- * @default 3
14872
+ * @default true
14861
14873
  */
14862
- vueVersion?: 2 | 3;
14874
+ packageJson?: boolean;
14875
+ /**
14876
+ * @default true
14877
+ */
14878
+ i18nLocale?: boolean;
14879
+ /**
14880
+ * @default true
14881
+ */
14882
+ pnpmWorkspace?: boolean;
14863
14883
  }
14864
14884
  interface ConfigSpecialsOptions {
14865
14885
  /**
@@ -14883,65 +14903,11 @@ interface ConfigSpecialsOptions {
14883
14903
  */
14884
14904
  specialCaseConfigs?: TypedConfigItem[];
14885
14905
  }
14886
- interface ConfigFormatOptions {
14887
- /**
14888
- * Enable formatter support for css, less, scss, sass and etc.
14889
- *
14890
- * @default 'prettier'
14891
- */
14892
- css?: boolean | 'prettier';
14893
- /**
14894
- * Enable formatter support for html
14895
- *
14896
- * @default 'prettier'
14897
- */
14898
- html?: boolean | 'prettier';
14899
- /**
14900
- * Enable formatter support for markdown
14901
- *
14902
- * @default 'prettier'
14903
- */
14904
- markdown?: boolean | 'dprint' | 'prettier';
14905
- /**
14906
- * Options for prettier
14907
- */
14908
- prettierOptions?: PrettierOptions;
14909
- /**
14910
- * Options for dprint
14911
- */
14912
- dprintOptions?: boolean;
14913
- }
14914
- interface ConfigPerfectionistOptions extends OptionsOverrides {
14915
- /**
14916
- * Enable sort `constants`
14917
- *
14918
- * @default true
14919
- */
14920
- sortConstants?: boolean;
14921
- /**
14922
- * Enable sort `enums`
14923
- *
14924
- * @default true
14925
- */
14926
- sortEnums?: boolean;
14927
- /**
14928
- * Enable sort `types`
14929
- *
14930
- * @default true
14931
- */
14932
- sortTypes?: boolean;
14933
- /**
14934
- * Overrides rules for `constants`
14935
- */
14936
- overridesConstantsRules?: TypedConfigItem['rules'];
14937
- /**
14938
- * Overrides rules for `enums`
14939
- */
14940
- overridesEnumsRules?: TypedConfigItem['rules'];
14906
+ interface ConfigTestOptions extends OptionsOverrides {
14941
14907
  /**
14942
- * Overrides rules for `types`
14908
+ * Overrides built-in vitest rules
14943
14909
  */
14944
- overridesTypesRules?: TypedConfigItem['rules'];
14910
+ overridesVitestRules?: TypedConfigItem['rules'];
14945
14911
  }
14946
14912
  interface ConfigTypeScriptOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14947
14913
  /**
@@ -14967,6 +14933,32 @@ interface ConfigTypeScriptOptions extends OptionsExtensions, OptionsFiles, Optio
14967
14933
  */
14968
14934
  overridesTypeAwareRules?: TypedConfigItem['rules'];
14969
14935
  }
14936
+ interface ConfigUnoCSSOptions extends OptionsOverrides {
14937
+ /**
14938
+ * Enable attributify sort order
14939
+ *
14940
+ * @default false
14941
+ */
14942
+ attributify?: boolean;
14943
+ }
14944
+ interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrides {
14945
+ /**
14946
+ * Create virtual files for Vue SFC blocks to enable linting.
14947
+ *
14948
+ * @see https://github.com/antfu/eslint-processor-vue-blocks
14949
+ * @default true
14950
+ */
14951
+ sfcBlocks?: boolean | Options;
14952
+ /**
14953
+ * Vue version
14954
+ *
14955
+ * @default 3
14956
+ */
14957
+ vueVersion?: 2 | 3;
14958
+ }
14959
+ interface OptionsOverrides<Rules extends TypedConfigItem['rules'] = TypedConfigItem['rules']> {
14960
+ overrides?: Rules;
14961
+ }
14970
14962
  /**
14971
14963
  * Config factory options
14972
14964
  */
@@ -15015,7 +15007,7 @@ interface ConfigOptionsInternal {
15015
15007
  /**
15016
15008
  * Prettier options
15017
15009
  */
15018
- type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'plugins' | 'tabWidth' | 'rangeEnd' | 'proseWrap' | 'endOfLine' | 'rangeStart' | 'quoteProps' | 'printWidth' | 'arrowParens' | 'singleQuote' | 'insertPragma' | 'trailingComma' | 'requirePragma' | 'bracketSpacing' | 'jsxSingleQuote' | 'bracketSameLine' | 'experimentalTernaries' | 'singleAttributePerLine' | 'vueIndentScriptAndStyle' | 'htmlWhitespaceSensitivity' | 'embeddedLanguageFormatting'>> & {
15010
+ type PrettierOptions = Partial<Pick<RequiredOptions, 'arrowParens' | 'bracketSameLine' | 'bracketSpacing' | 'embeddedLanguageFormatting' | 'endOfLine' | 'experimentalTernaries' | 'htmlWhitespaceSensitivity' | 'insertPragma' | 'jsxSingleQuote' | 'plugins' | 'printWidth' | 'proseWrap' | 'quoteProps' | 'rangeEnd' | 'rangeStart' | 'requirePragma' | 'semi' | 'singleAttributePerLine' | 'singleQuote' | 'tabWidth' | 'trailingComma' | 'useTabs' | 'vueIndentScriptAndStyle'>> & {
15019
15011
  parser?: BuiltInParserName;
15020
15012
  };
15021
15013
 
@@ -15171,6 +15163,9 @@ declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem
15171
15163
 
15172
15164
  declare const githubAction: (options?: ConfigGitHubActionOptions) => TypedConfigItem[];
15173
15165
 
15166
+ /**
15167
+ * Prefer `alphabetical` sort type
15168
+ */
15174
15169
  declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConfigItem[];
15175
15170
 
15176
15171
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
@@ -15180,4 +15175,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
15180
15175
  */
15181
15176
  declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
15182
15177
 
15183
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigFormatOptions, type ConfigGitHubActionOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, format, getOverrides, githubAction, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
15178
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigFormatOptions, type ConfigGitHubActionOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, format, getOverrides, githubAction, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.d.ts CHANGED
@@ -50,25 +50,17 @@ type Arrayable<T> = T | T[];
50
50
  /**
51
51
  * Promise or not
52
52
  */
53
- type Awaitable<T> = T | Promise<T>;
53
+ type Awaitable<T> = Promise<T> | T;
54
54
  /**
55
55
  * Make types human readable
56
56
  */
57
+ type InteropModuleDefault<T> = T extends {
58
+ default: infer U;
59
+ } ? U : T;
57
60
  type Pretty<T> = {
58
61
  [P in keyof T]: T[P];
59
62
  } & {};
60
63
  type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
61
- type InteropModuleDefault<T> = T extends {
62
- default: infer U;
63
- } ? U : T;
64
- /**
65
- * A literal type that supports custom further strings but preserves autocompletion in IDEs.
66
- *
67
- * @see https://github.com/microsoft/TypeScript/issues/29729#issuecomment-471566609
68
- */
69
- type LiteralUnion<Union extends Base, Base = string> = Union | (Base & {
70
- zz_IGNORE_ME?: never;
71
- });
72
64
 
73
65
  interface RuleOptions {
74
66
  /**
@@ -14720,88 +14712,83 @@ type ConfigIgnoresOptions = string[];
14720
14712
  /**
14721
14713
  * Options for overrides `files`
14722
14714
  */
14723
- interface OptionsFiles {
14724
- files?: string[];
14725
- }
14726
14715
  type ConfigCommandOptions = ESLintPluginCommandOptions;
14727
14716
  interface ConfigYmlOptions extends OptionsOverrides {
14728
14717
  }
14718
+ interface OptionsFiles {
14719
+ files?: string[];
14720
+ }
14729
14721
  /**
14730
14722
  * Options for add `extensions` support
14731
14723
  */
14732
- interface OptionsExtensions {
14733
- extensions?: string[];
14724
+ interface ConfigAntfuOptions extends OptionsOverrides {
14734
14725
  }
14735
- interface ConfigNodeOptions extends OptionsOverrides {
14726
+ interface ConfigCommentsOptions extends OptionsOverrides {
14736
14727
  }
14737
- interface ConfigTomlOptions extends OptionsOverrides {
14728
+ interface ConfigGitHubActionOptions extends OptionsOverrides {
14738
14729
  }
14739
- interface ConfigAntfuOptions extends OptionsOverrides {
14730
+ interface ConfigImportsOptions extends OptionsOverrides {
14740
14731
  }
14741
- interface ConfigNtnyqOptions extends OptionsOverrides {
14732
+ interface ConfigJsdocOptions extends OptionsFeatures, OptionsOverrides {
14742
14733
  }
14743
14734
  interface ConfigJsoncOptions extends OptionsOverrides {
14744
14735
  }
14745
- interface ConfigUnicornOptions extends OptionsOverrides {
14746
- }
14747
- interface ConfigImportsOptions extends OptionsOverrides {
14736
+ interface ConfigNodeOptions extends OptionsOverrides {
14748
14737
  }
14749
- interface ConfigCommentsOptions extends OptionsOverrides {
14738
+ interface ConfigNtnyqOptions extends OptionsOverrides {
14750
14739
  }
14751
14740
  interface ConfigStylisticOptions extends OptionsOverrides {
14752
14741
  }
14753
- interface ConfigGitHubActionOptions extends OptionsOverrides {
14742
+ interface ConfigTomlOptions extends OptionsOverrides {
14743
+ }
14744
+ interface ConfigUnicornOptions extends OptionsOverrides {
14754
14745
  }
14755
14746
  interface ConfigUnusedImportsOptions extends OptionsOverrides {
14756
14747
  }
14757
- interface ConfigJsdocOptions extends OptionsFeatures, OptionsOverrides {
14748
+ interface OptionsExtensions {
14749
+ extensions?: string[];
14758
14750
  }
14759
14751
  /**
14760
14752
  * Options for add `features` support
14761
14753
  */
14754
+ interface ConfigMarkdownOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14755
+ }
14762
14756
  type OptionsFeatures = {
14763
14757
  /**
14764
14758
  * Enable typescript support
14765
14759
  */
14766
14760
  typescript?: boolean;
14767
14761
  };
14768
- interface ConfigMarkdownOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14769
- }
14770
14762
  /**
14771
14763
  * Options for overrides `rules`
14772
14764
  */
14773
- interface OptionsOverrides<Rules extends TypedConfigItem['rules'] = TypedConfigItem['rules']> {
14774
- overrides?: Rules;
14775
- }
14776
- interface ConfigRegexpOptions extends OptionsOverrides {
14765
+ interface ConfigFormatOptions {
14777
14766
  /**
14778
- * Prettier level
14767
+ * Enable formatter support for css, less, scss, sass and etc.
14779
14768
  *
14780
- * @default 'error'
14769
+ * @default 'prettier'
14781
14770
  */
14782
- level?: 'warn' | 'error';
14783
- }
14784
- interface ConfigUnoCSSOptions extends OptionsOverrides {
14771
+ css?: 'prettier' | boolean;
14785
14772
  /**
14786
- * Enable attributify sort order
14773
+ * Enable formatter support for html
14787
14774
  *
14788
- * @default false
14775
+ * @default 'prettier'
14789
14776
  */
14790
- attributify?: boolean;
14791
- }
14792
- interface ConfigTestOptions extends OptionsOverrides {
14777
+ html?: 'prettier' | boolean;
14793
14778
  /**
14794
- * Overrides built-in vitest rules
14779
+ * Enable formatter support for markdown
14780
+ *
14781
+ * @default 'prettier'
14795
14782
  */
14796
- overridesVitestRules?: TypedConfigItem['rules'];
14797
- }
14798
- interface ConfigJavaScriptOptions extends OptionsOverrides {
14783
+ markdown?: 'dprint' | 'prettier' | boolean;
14799
14784
  /**
14800
- * Enable strict checking for JavaScript files
14801
- *
14802
- * @default false
14785
+ * Options for prettier
14803
14786
  */
14804
- strict?: boolean;
14787
+ prettierOptions?: PrettierOptions;
14788
+ /**
14789
+ * Options for dprint
14790
+ */
14791
+ dprintOptions?: boolean;
14805
14792
  }
14806
14793
  type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
14807
14794
  /**
@@ -14811,23 +14798,45 @@ type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
14811
14798
  */
14812
14799
  strict?: boolean;
14813
14800
  };
14814
- interface ConfigSortOptions {
14801
+ interface ConfigJavaScriptOptions extends OptionsOverrides {
14815
14802
  /**
14816
- * @default true
14803
+ * Enable strict checking for JavaScript files
14804
+ *
14805
+ * @default false
14817
14806
  */
14818
- tsconfig?: boolean;
14807
+ strict?: boolean;
14808
+ }
14809
+ interface ConfigPerfectionistOptions extends OptionsOverrides {
14819
14810
  /**
14811
+ * Enable sort `constants`
14812
+ *
14820
14813
  * @default true
14821
14814
  */
14822
- packageJson?: boolean;
14815
+ sortConstants?: boolean;
14823
14816
  /**
14817
+ * Enable sort `enums`
14818
+ *
14824
14819
  * @default true
14825
14820
  */
14826
- i18nLocale?: boolean;
14821
+ sortEnums?: boolean;
14827
14822
  /**
14823
+ * Enable sort `types`
14824
+ *
14828
14825
  * @default true
14829
14826
  */
14830
- pnpmWorkspace?: boolean;
14827
+ sortTypes?: boolean;
14828
+ /**
14829
+ * Overrides rules for `constants`
14830
+ */
14831
+ overridesConstantsRules?: TypedConfigItem['rules'];
14832
+ /**
14833
+ * Overrides rules for `enums`
14834
+ */
14835
+ overridesEnumsRules?: TypedConfigItem['rules'];
14836
+ /**
14837
+ * Overrides rules for `types`
14838
+ */
14839
+ overridesTypesRules?: TypedConfigItem['rules'];
14831
14840
  }
14832
14841
  interface ConfigPrettierOptions extends OptionsOverrides {
14833
14842
  /**
@@ -14835,7 +14844,7 @@ interface ConfigPrettierOptions extends OptionsOverrides {
14835
14844
  *
14836
14845
  * @default 'warn'
14837
14846
  */
14838
- level?: 'warn' | 'error';
14847
+ level?: 'error' | 'warn';
14839
14848
  /**
14840
14849
  * Glob of built-in disabled files
14841
14850
  */
@@ -14846,20 +14855,31 @@ interface ConfigPrettierOptions extends OptionsOverrides {
14846
14855
  */
14847
14856
  userDisabledFiles?: string[];
14848
14857
  }
14849
- interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrides {
14858
+ interface ConfigRegexpOptions extends OptionsOverrides {
14850
14859
  /**
14851
- * Create virtual files for Vue SFC blocks to enable linting.
14860
+ * Prettier level
14852
14861
  *
14853
- * @see https://github.com/antfu/eslint-processor-vue-blocks
14862
+ * @default 'error'
14863
+ */
14864
+ level?: 'error' | 'warn';
14865
+ }
14866
+ interface ConfigSortOptions {
14867
+ /**
14854
14868
  * @default true
14855
14869
  */
14856
- sfcBlocks?: boolean | Options;
14870
+ tsconfig?: boolean;
14857
14871
  /**
14858
- * Vue version
14859
- *
14860
- * @default 3
14872
+ * @default true
14861
14873
  */
14862
- vueVersion?: 2 | 3;
14874
+ packageJson?: boolean;
14875
+ /**
14876
+ * @default true
14877
+ */
14878
+ i18nLocale?: boolean;
14879
+ /**
14880
+ * @default true
14881
+ */
14882
+ pnpmWorkspace?: boolean;
14863
14883
  }
14864
14884
  interface ConfigSpecialsOptions {
14865
14885
  /**
@@ -14883,65 +14903,11 @@ interface ConfigSpecialsOptions {
14883
14903
  */
14884
14904
  specialCaseConfigs?: TypedConfigItem[];
14885
14905
  }
14886
- interface ConfigFormatOptions {
14887
- /**
14888
- * Enable formatter support for css, less, scss, sass and etc.
14889
- *
14890
- * @default 'prettier'
14891
- */
14892
- css?: boolean | 'prettier';
14893
- /**
14894
- * Enable formatter support for html
14895
- *
14896
- * @default 'prettier'
14897
- */
14898
- html?: boolean | 'prettier';
14899
- /**
14900
- * Enable formatter support for markdown
14901
- *
14902
- * @default 'prettier'
14903
- */
14904
- markdown?: boolean | 'dprint' | 'prettier';
14905
- /**
14906
- * Options for prettier
14907
- */
14908
- prettierOptions?: PrettierOptions;
14909
- /**
14910
- * Options for dprint
14911
- */
14912
- dprintOptions?: boolean;
14913
- }
14914
- interface ConfigPerfectionistOptions extends OptionsOverrides {
14915
- /**
14916
- * Enable sort `constants`
14917
- *
14918
- * @default true
14919
- */
14920
- sortConstants?: boolean;
14921
- /**
14922
- * Enable sort `enums`
14923
- *
14924
- * @default true
14925
- */
14926
- sortEnums?: boolean;
14927
- /**
14928
- * Enable sort `types`
14929
- *
14930
- * @default true
14931
- */
14932
- sortTypes?: boolean;
14933
- /**
14934
- * Overrides rules for `constants`
14935
- */
14936
- overridesConstantsRules?: TypedConfigItem['rules'];
14937
- /**
14938
- * Overrides rules for `enums`
14939
- */
14940
- overridesEnumsRules?: TypedConfigItem['rules'];
14906
+ interface ConfigTestOptions extends OptionsOverrides {
14941
14907
  /**
14942
- * Overrides rules for `types`
14908
+ * Overrides built-in vitest rules
14943
14909
  */
14944
- overridesTypesRules?: TypedConfigItem['rules'];
14910
+ overridesVitestRules?: TypedConfigItem['rules'];
14945
14911
  }
14946
14912
  interface ConfigTypeScriptOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14947
14913
  /**
@@ -14967,6 +14933,32 @@ interface ConfigTypeScriptOptions extends OptionsExtensions, OptionsFiles, Optio
14967
14933
  */
14968
14934
  overridesTypeAwareRules?: TypedConfigItem['rules'];
14969
14935
  }
14936
+ interface ConfigUnoCSSOptions extends OptionsOverrides {
14937
+ /**
14938
+ * Enable attributify sort order
14939
+ *
14940
+ * @default false
14941
+ */
14942
+ attributify?: boolean;
14943
+ }
14944
+ interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrides {
14945
+ /**
14946
+ * Create virtual files for Vue SFC blocks to enable linting.
14947
+ *
14948
+ * @see https://github.com/antfu/eslint-processor-vue-blocks
14949
+ * @default true
14950
+ */
14951
+ sfcBlocks?: boolean | Options;
14952
+ /**
14953
+ * Vue version
14954
+ *
14955
+ * @default 3
14956
+ */
14957
+ vueVersion?: 2 | 3;
14958
+ }
14959
+ interface OptionsOverrides<Rules extends TypedConfigItem['rules'] = TypedConfigItem['rules']> {
14960
+ overrides?: Rules;
14961
+ }
14970
14962
  /**
14971
14963
  * Config factory options
14972
14964
  */
@@ -15015,7 +15007,7 @@ interface ConfigOptionsInternal {
15015
15007
  /**
15016
15008
  * Prettier options
15017
15009
  */
15018
- type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'plugins' | 'tabWidth' | 'rangeEnd' | 'proseWrap' | 'endOfLine' | 'rangeStart' | 'quoteProps' | 'printWidth' | 'arrowParens' | 'singleQuote' | 'insertPragma' | 'trailingComma' | 'requirePragma' | 'bracketSpacing' | 'jsxSingleQuote' | 'bracketSameLine' | 'experimentalTernaries' | 'singleAttributePerLine' | 'vueIndentScriptAndStyle' | 'htmlWhitespaceSensitivity' | 'embeddedLanguageFormatting'>> & {
15010
+ type PrettierOptions = Partial<Pick<RequiredOptions, 'arrowParens' | 'bracketSameLine' | 'bracketSpacing' | 'embeddedLanguageFormatting' | 'endOfLine' | 'experimentalTernaries' | 'htmlWhitespaceSensitivity' | 'insertPragma' | 'jsxSingleQuote' | 'plugins' | 'printWidth' | 'proseWrap' | 'quoteProps' | 'rangeEnd' | 'rangeStart' | 'requirePragma' | 'semi' | 'singleAttributePerLine' | 'singleQuote' | 'tabWidth' | 'trailingComma' | 'useTabs' | 'vueIndentScriptAndStyle'>> & {
15019
15011
  parser?: BuiltInParserName;
15020
15012
  };
15021
15013
 
@@ -15171,6 +15163,9 @@ declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem
15171
15163
 
15172
15164
  declare const githubAction: (options?: ConfigGitHubActionOptions) => TypedConfigItem[];
15173
15165
 
15166
+ /**
15167
+ * Prefer `alphabetical` sort type
15168
+ */
15174
15169
  declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConfigItem[];
15175
15170
 
15176
15171
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
@@ -15180,4 +15175,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
15180
15175
  */
15181
15176
  declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
15182
15177
 
15183
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigFormatOptions, type ConfigGitHubActionOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, format, getOverrides, githubAction, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
15178
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigFormatOptions, type ConfigGitHubActionOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, format, getOverrides, githubAction, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.js CHANGED
@@ -1310,51 +1310,51 @@ var unocss = (options = {}) => [
1310
1310
 
1311
1311
  // src/constants.ts
1312
1312
  var DEFAULT_PRETTIER_OPTIONS = {
1313
- // Specify the number of spaces per indentation-level
1314
- tabWidth: 2,
1315
- // Use semicolons or not
1316
- semi: false,
1317
- // Format only a segment of a file.
1318
- rangeStart: 0,
1319
- // Indent lines with tabs instead of spaces
1320
- useTabs: false,
1321
- // Maximum line length
1322
- printWidth: 100,
1313
+ // Include parentheses around a sole arrow function parameter
1314
+ arrowParens: "avoid",
1315
+ // Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
1316
+ bracketSameLine: false,
1317
+ // Print spaces between brackets in object literals.
1318
+ bracketSpacing: true,
1319
+ // Control whether Prettier formats quoted code embedded in the file
1320
+ embeddedLanguageFormatting: "auto",
1323
1321
  // End of line
1324
1322
  endOfLine: "lf",
1325
- // Use single quotes instead of double quotes
1326
- singleQuote: true,
1323
+ // Specify the global whitespace sensitivity for HTML files
1324
+ htmlWhitespaceSensitivity: "css",
1327
1325
  // Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
1328
1326
  insertPragma: false,
1329
1327
  // Use single quotes instead of double quotes in JSX
1330
1328
  jsxSingleQuote: true,
1331
- // Print trailing commas wherever possible when multi-line
1332
- trailingComma: "all",
1333
- // Print spaces between brackets in object literals.
1334
- bracketSpacing: true,
1335
- // Include parentheses around a sole arrow function parameter
1336
- arrowParens: "avoid",
1337
- // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
1338
- requirePragma: false,
1339
- // Specify which parser to use.
1340
- // parser: undefined,
1341
- // Specify the file name to use to infer which parser to use.
1342
- // filepath: undefined,
1329
+ // Maximum line length
1330
+ printWidth: 100,
1343
1331
  // By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and Bitbucket.
1344
1332
  proseWrap: "preserve",
1345
- // Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
1346
- bracketSameLine: false,
1347
1333
  // Change when properties in objects are quoted
1348
1334
  quoteProps: "as-needed",
1335
+ rangeEnd: Number.POSITIVE_INFINITY,
1336
+ // Format only a segment of a file.
1337
+ rangeStart: 0,
1338
+ // Specify which parser to use.
1339
+ // parser: undefined,
1340
+ // Specify the file name to use to infer which parser to use.
1341
+ // filepath: undefined,
1342
+ // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
1343
+ requirePragma: false,
1344
+ // Use semicolons or not
1345
+ semi: false,
1349
1346
  // Enforce single attribute per line in HTML, Vue and JSX
1350
1347
  singleAttributePerLine: true,
1348
+ // Use single quotes instead of double quotes
1349
+ singleQuote: true,
1350
+ // Specify the number of spaces per indentation-level
1351
+ tabWidth: 2,
1352
+ // Print trailing commas wherever possible when multi-line
1353
+ trailingComma: "all",
1354
+ // Indent lines with tabs instead of spaces
1355
+ useTabs: false,
1351
1356
  // Whether or not to indent the code inside <script> and <style> tags in Vue files
1352
- vueIndentScriptAndStyle: false,
1353
- // Specify the global whitespace sensitivity for HTML files
1354
- htmlWhitespaceSensitivity: "css",
1355
- rangeEnd: Number.POSITIVE_INFINITY,
1356
- // Control whether Prettier formats quoted code embedded in the file
1357
- embeddedLanguageFormatting: "auto"
1357
+ vueIndentScriptAndStyle: false
1358
1358
  };
1359
1359
 
1360
1360
  // src/utils/env.ts
@@ -1703,7 +1703,7 @@ var specials = (options = {}) => [
1703
1703
  "perfectionist/sort-objects": [
1704
1704
  "error",
1705
1705
  {
1706
- type: "line-length",
1706
+ type: "alphabetical",
1707
1707
  order: "asc"
1708
1708
  }
1709
1709
  ],
@@ -2449,15 +2449,16 @@ var perfectionist = (options = {}) => {
2449
2449
  "perfectionist/sort-enums": [
2450
2450
  "error",
2451
2451
  {
2452
- type: "line-length",
2452
+ type: "alphabetical",
2453
2453
  order: "asc"
2454
2454
  }
2455
2455
  ],
2456
2456
  "perfectionist/sort-modules": [
2457
2457
  "error",
2458
2458
  {
2459
- type: "line-length",
2460
- order: "asc"
2459
+ type: "alphabetical",
2460
+ order: "asc",
2461
+ partitionByComment: true
2461
2462
  }
2462
2463
  ],
2463
2464
  // Overrides rules
@@ -2511,8 +2512,9 @@ var perfectionist = (options = {}) => {
2511
2512
  "perfectionist/sort-modules": [
2512
2513
  "error",
2513
2514
  {
2514
- type: "line-length",
2515
- order: "asc"
2515
+ type: "alphabetical",
2516
+ order: "asc",
2517
+ partitionByComment: true
2516
2518
  }
2517
2519
  ],
2518
2520
  "perfectionist/sort-object-types": [
@@ -2525,7 +2527,7 @@ var perfectionist = (options = {}) => {
2525
2527
  "perfectionist/sort-union-types": [
2526
2528
  "error",
2527
2529
  {
2528
- type: "line-length",
2530
+ type: "alphabetical",
2529
2531
  order: "asc"
2530
2532
  }
2531
2533
  ],
@@ -2552,17 +2554,25 @@ var perfectionist = (options = {}) => {
2552
2554
  "perfectionist/sort-objects": [
2553
2555
  "error",
2554
2556
  {
2555
- type: "line-length",
2557
+ type: "alphabetical",
2556
2558
  order: "asc"
2557
2559
  }
2558
2560
  ],
2559
2561
  "perfectionist/sort-sets": [
2560
2562
  "error",
2561
2563
  {
2562
- type: "line-length",
2564
+ type: "alphabetical",
2563
2565
  order: "asc"
2564
2566
  }
2565
2567
  ],
2568
+ "perfectionist/sort-modules": [
2569
+ "error",
2570
+ {
2571
+ type: "alphabetical",
2572
+ order: "asc",
2573
+ partitionByComment: true
2574
+ }
2575
+ ],
2566
2576
  // Overrides rules
2567
2577
  ...options.overridesConstantsRules
2568
2578
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "3.7.0",
4
+ "version": "3.7.1",
5
5
  "packageManager": "pnpm@9.14.4",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [