@ntnyq/eslint-config 3.5.1 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import { Linter } from 'eslint';
7
7
  import { ConfigWithExtends } from 'typescript-eslint';
8
8
  export { plugin as pluginTypeScript, configs as typescriptConfigs } from 'typescript-eslint';
9
9
  import { RequiredOptions, BuiltInParserName } from 'prettier';
10
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
10
11
  import * as eslintPluginRegexp from 'eslint-plugin-regexp';
11
12
  export { eslintPluginRegexp as pluginRegexp };
12
13
  export { default as pluginNode } from 'eslint-plugin-n';
@@ -56,6 +57,10 @@ type Awaitable<T> = T | Promise<T>;
56
57
  type Pretty<T> = {
57
58
  [P in keyof T]: T[P];
58
59
  } & {};
60
+ type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
61
+ type InteropModuleDefault<T> = T extends {
62
+ default: infer U;
63
+ } ? U : T;
59
64
  /**
60
65
  * A literal type that supports custom further strings but preserves autocompletion in IDEs.
61
66
  *
@@ -64,10 +69,6 @@ type Pretty<T> = {
64
69
  type LiteralUnion<Union extends Base, Base = string> = Union | (Base & {
65
70
  zz_IGNORE_ME?: never;
66
71
  });
67
- type InteropModuleDefault<T> = T extends {
68
- default: infer U;
69
- } ? U : T;
70
- type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
71
72
 
72
73
  interface RuleOptions {
73
74
  /**
@@ -1548,6 +1549,11 @@ interface RuleOptions {
1548
1549
  * @see https://eslint-plugin-github-action.ntnyq.com/rules/max-jobs-per-action.html
1549
1550
  */
1550
1551
  'github-action/max-jobs-per-action'?: Linter.RuleEntry<GithubActionMaxJobsPerAction>;
1552
+ /**
1553
+ * disallow using top level env.
1554
+ * @see https://eslint-plugin-github-action.ntnyq.com/rules/no-top-level-env.html
1555
+ */
1556
+ 'github-action/no-top-level-env'?: Linter.RuleEntry<[]>;
1551
1557
  /**
1552
1558
  * disallow using top level permissions.
1553
1559
  * @see https://eslint-plugin-github-action.ntnyq.com/rules/no-top-level-permissions.html
@@ -1558,6 +1564,16 @@ interface RuleOptions {
1558
1564
  * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-action-name.html
1559
1565
  */
1560
1566
  'github-action/require-action-name'?: Linter.RuleEntry<[]>;
1567
+ /**
1568
+ * require job name to be set.
1569
+ * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-job-name.html
1570
+ */
1571
+ 'github-action/require-job-name'?: Linter.RuleEntry<[]>;
1572
+ /**
1573
+ * require job step name to be set.
1574
+ * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-job-step-name.html
1575
+ */
1576
+ 'github-action/require-job-step-name'?: Linter.RuleEntry<[]>;
1561
1577
  /**
1562
1578
  * Require `require()` calls to be placed at top-level module scope
1563
1579
  * @see https://eslint.org/docs/latest/rules/global-require
@@ -2582,7 +2598,7 @@ interface RuleOptions {
2582
2598
  */
2583
2599
  'no-class-assign'?: Linter.RuleEntry<[]>;
2584
2600
  /**
2585
- * Disallow comparing against -0
2601
+ * Disallow comparing against `-0`
2586
2602
  * @see https://eslint.org/docs/latest/rules/no-compare-neg-zero
2587
2603
  */
2588
2604
  'no-compare-neg-zero'?: Linter.RuleEntry<[]>;
@@ -5947,7 +5963,7 @@ interface RuleOptions {
5947
5963
  * enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`
5948
5964
  * @see https://eslint.vuejs.org/rules/no-duplicate-attr-inheritance.html
5949
5965
  */
5950
- 'vue/no-duplicate-attr-inheritance'?: Linter.RuleEntry<[]>;
5966
+ 'vue/no-duplicate-attr-inheritance'?: Linter.RuleEntry<VueNoDuplicateAttrInheritance>;
5951
5967
  /**
5952
5968
  * disallow duplication of attributes
5953
5969
  * @see https://eslint.vuejs.org/rules/no-duplicate-attributes.html
@@ -6392,7 +6408,7 @@ interface RuleOptions {
6392
6408
  */
6393
6409
  'vue/prefer-true-attribute-shorthand'?: Linter.RuleEntry<VuePreferTrueAttributeShorthand>;
6394
6410
  /**
6395
- * require using `useTemplateRef` instead of `ref` for template refs
6411
+ * require using `useTemplateRef` instead of `ref`/`shallowRef` for template refs
6396
6412
  * @see https://eslint.vuejs.org/rules/prefer-use-template-ref.html
6397
6413
  */
6398
6414
  'vue/prefer-use-template-ref'?: Linter.RuleEntry<[]>;
@@ -6506,6 +6522,11 @@ interface RuleOptions {
6506
6522
  * @see https://eslint.vuejs.org/rules/require-valid-default-prop.html
6507
6523
  */
6508
6524
  'vue/require-valid-default-prop'?: Linter.RuleEntry<[]>;
6525
+ /**
6526
+ * enforce using only specific component names
6527
+ * @see https://eslint.vuejs.org/rules/restricted-component-names.html
6528
+ */
6529
+ 'vue/restricted-component-names'?: Linter.RuleEntry<VueRestrictedComponentNames>;
6509
6530
  /**
6510
6531
  * enforce that a return statement is present in computed property
6511
6532
  * @see https://eslint.vuejs.org/rules/return-in-computed-property.html
@@ -6532,6 +6553,11 @@ interface RuleOptions {
6532
6553
  * @see https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html
6533
6554
  */
6534
6555
  'vue/singleline-html-element-content-newline'?: Linter.RuleEntry<VueSinglelineHtmlElementContentNewline>;
6556
+ /**
6557
+ * enforce specific casing for slot names
6558
+ * @see https://eslint.vuejs.org/rules/slot-name-casing.html
6559
+ */
6560
+ 'vue/slot-name-casing'?: Linter.RuleEntry<VueSlotNameCasing>;
6535
6561
  /**
6536
6562
  * enforce sort-keys in a manner that is compatible with order-in-components
6537
6563
  * @see https://eslint.vuejs.org/rules/sort-keys.html
@@ -9872,6 +9898,7 @@ type JsdocInformativeDocs = [] | [
9872
9898
  ];
9873
9899
  type JsdocLinesBeforeBlock = [] | [
9874
9900
  {
9901
+ checkBlockStarts?: boolean;
9875
9902
  excludedTags?: string[];
9876
9903
  ignoreSameLine?: boolean;
9877
9904
  lines?: number;
@@ -12159,9 +12186,13 @@ type PerfectionistSortObjectTypes = [] | [
12159
12186
  ];
12160
12187
  type PerfectionistSortObjects = [] | [
12161
12188
  {
12189
+ destructuredObjects?: (boolean | {
12190
+ groups?: boolean;
12191
+ });
12162
12192
  ignorePattern?: string[];
12163
12193
  partitionByComment?: (string[] | boolean | string);
12164
12194
  destructureOnly?: boolean;
12195
+ objectDeclarations?: boolean;
12165
12196
  styledComponents?: boolean;
12166
12197
  partitionByNewLine?: boolean;
12167
12198
  specialCharacters?: ("remove" | "trim" | "keep");
@@ -12497,6 +12528,7 @@ type SortKeys = [] | [("asc" | "desc")] | [
12497
12528
  natural?: boolean;
12498
12529
  minKeys?: number;
12499
12530
  allowLineSeparatedGroups?: boolean;
12531
+ ignoreComputedKeys?: boolean;
12500
12532
  }
12501
12533
  ];
12502
12534
  type SortVars = [] | [
@@ -13120,6 +13152,7 @@ type VueAttributeHyphenation = [] | [("always" | "never")] | [
13120
13152
  } & {
13121
13153
  [k: string]: unknown | undefined;
13122
13154
  })[];
13155
+ ignoreTags?: string[];
13123
13156
  }
13124
13157
  ];
13125
13158
  type VueAttributesOrder = [] | [
@@ -13890,6 +13923,11 @@ type VueNoDupeKeys = [] | [
13890
13923
  groups?: unknown[];
13891
13924
  }
13892
13925
  ];
13926
+ type VueNoDuplicateAttrInheritance = [] | [
13927
+ {
13928
+ checkMultiRootNodes?: boolean;
13929
+ }
13930
+ ];
13893
13931
  type VueNoDuplicateAttributes = [] | [
13894
13932
  {
13895
13933
  allowCoexistClass?: boolean;
@@ -14136,6 +14174,7 @@ type VueNoUselessVBind = [] | [
14136
14174
  type VueNoVTextVHtmlOnComponent = [] | [
14137
14175
  {
14138
14176
  allow?: string[];
14177
+ ignoreElementNamespaces?: boolean;
14139
14178
  }
14140
14179
  ];
14141
14180
  type VueObjectCurlyNewline = [] | [
@@ -14275,6 +14314,11 @@ type VueRequireToggleInsideTransition = [] | [
14275
14314
  additionalDirectives?: string[];
14276
14315
  }
14277
14316
  ];
14317
+ type VueRestrictedComponentNames = [] | [
14318
+ {
14319
+ allow?: string[];
14320
+ }
14321
+ ];
14278
14322
  type VueReturnInComputedProperty = [] | [
14279
14323
  {
14280
14324
  treatUndefinedAsUnspecified?: boolean;
@@ -14300,6 +14344,7 @@ type VueSinglelineHtmlElementContentNewline = [] | [
14300
14344
  externalIgnores?: string[];
14301
14345
  }
14302
14346
  ];
14347
+ type VueSlotNameCasing = [] | [("camelCase" | "kebab-case" | "singleword")];
14303
14348
  type VueSortKeys = [] | [("asc" | "desc")] | [
14304
14349
  ("asc" | "desc"),
14305
14350
  {
@@ -14349,6 +14394,7 @@ type VueVOnEventHyphenation = [] | [("always" | "never")] | [
14349
14394
  } & {
14350
14395
  [k: string]: unknown | undefined;
14351
14396
  })[];
14397
+ ignoreTags?: string[];
14352
14398
  }
14353
14399
  ];
14354
14400
  type VueVOnFunctionCall = [] | [("always" | "never")] | [
@@ -14634,17 +14680,8 @@ type Yoda = [] | [("always" | "never")] | [
14634
14680
  onlyEquality?: boolean;
14635
14681
  }
14636
14682
  ];
14637
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/format/setup' | 'ntnyq/format/css' | 'ntnyq/format/scss' | 'ntnyq/format/less' | 'ntnyq/format/html' | 'ntnyq/github-action' | 'ntnyq/gitignore' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/perfectionist' | 'ntnyq/regexp' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/userscript' | 'ntnyq/stylistic' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vitest' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yaml';
14683
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/format/setup' | 'ntnyq/format/css' | 'ntnyq/format/scss' | 'ntnyq/format/less' | 'ntnyq/format/html' | 'ntnyq/github-action' | 'ntnyq/gitignore' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/regexp' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/stylistic' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vitest' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yaml';
14638
14684
 
14639
- /**
14640
- * Typed flat config item
14641
- */
14642
- type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'plugins'> & {
14643
- /**
14644
- * Most plugin are not properly typed
14645
- */
14646
- plugins?: Record<string, any>;
14647
- };
14648
14685
  /**
14649
14686
  * ESLint config
14650
14687
  */
@@ -14665,49 +14702,84 @@ type ESLintParserOptions = Linter.ParserOptions;
14665
14702
  * TypeScript ESLint parserOptions
14666
14703
  */
14667
14704
  type TSESLintParserOptions = Pretty<Required<Required<ConfigWithExtends>['languageOptions']>['parserOptions']>;
14705
+ /**
14706
+ * Typed flat config item
14707
+ */
14708
+ type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'plugins'> & {
14709
+ /**
14710
+ * Most plugin are not properly typed
14711
+ */
14712
+ plugins?: Record<string, any>;
14713
+ };
14668
14714
 
14669
14715
  /**
14670
14716
  * @file Config options
14671
14717
  */
14672
14718
 
14719
+ type ConfigIgnoresOptions = string[];
14673
14720
  /**
14674
14721
  * Options for overrides `files`
14675
14722
  */
14676
14723
  interface OptionsFiles {
14677
14724
  files?: string[];
14678
14725
  }
14726
+ type ConfigCommandOptions = ESLintPluginCommandOptions;
14727
+ interface ConfigYmlOptions extends OptionsOverrides {
14728
+ }
14679
14729
  /**
14680
14730
  * Options for add `extensions` support
14681
14731
  */
14682
14732
  interface OptionsExtensions {
14683
14733
  extensions?: string[];
14684
14734
  }
14735
+ interface ConfigNodeOptions extends OptionsOverrides {
14736
+ }
14737
+ interface ConfigTomlOptions extends OptionsOverrides {
14738
+ }
14739
+ interface ConfigAntfuOptions extends OptionsOverrides {
14740
+ }
14741
+ interface ConfigNtnyqOptions extends OptionsOverrides {
14742
+ }
14743
+ interface ConfigJsoncOptions extends OptionsOverrides {
14744
+ }
14745
+ interface ConfigUnicornOptions extends OptionsOverrides {
14746
+ }
14747
+ interface ConfigImportsOptions extends OptionsOverrides {
14748
+ }
14749
+ interface ConfigCommentsOptions extends OptionsOverrides {
14750
+ }
14751
+ interface ConfigStylisticOptions extends OptionsOverrides {
14752
+ }
14753
+ interface ConfigGitHubActionOptions extends OptionsOverrides {
14754
+ }
14755
+ interface ConfigUnusedImportsOptions extends OptionsOverrides {
14756
+ }
14757
+ interface ConfigJsdocOptions extends OptionsFeatures, OptionsOverrides {
14758
+ }
14685
14759
  /**
14686
14760
  * Options for add `features` support
14687
14761
  */
14688
14762
  type OptionsFeatures = {
14689
14763
  /**
14690
- * Support typescript
14764
+ * Enable typescript support
14691
14765
  */
14692
14766
  typescript?: boolean;
14693
14767
  };
14768
+ interface ConfigMarkdownOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14769
+ }
14694
14770
  /**
14695
14771
  * Options for overrides `rules`
14696
14772
  */
14697
14773
  interface OptionsOverrides<Rules extends TypedConfigItem['rules'] = TypedConfigItem['rules']> {
14698
14774
  overrides?: Rules;
14699
14775
  }
14700
- type ConfigIgnoresOptions = string[];
14701
- type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
14776
+ interface ConfigRegexpOptions extends OptionsOverrides {
14702
14777
  /**
14703
- * Throw an error if gitignore file not found.
14778
+ * Prettier level
14704
14779
  *
14705
- * @default false
14780
+ * @default 'error'
14706
14781
  */
14707
- strict?: boolean;
14708
- };
14709
- type ConfigCommandOptions = ESLintPluginCommandOptions;
14710
- interface ConfigJsdocOptions extends OptionsOverrides {
14782
+ level?: 'warn' | 'error';
14711
14783
  }
14712
14784
  interface ConfigUnoCSSOptions extends OptionsOverrides {
14713
14785
  /**
@@ -14717,66 +14789,11 @@ interface ConfigUnoCSSOptions extends OptionsOverrides {
14717
14789
  */
14718
14790
  attributify?: boolean;
14719
14791
  }
14720
- interface ConfigUnicornOptions extends OptionsOverrides {
14721
- }
14722
- interface ConfigImportsOptions extends OptionsOverrides {
14723
- }
14724
- interface ConfigNodeOptions extends OptionsOverrides {
14725
- }
14726
- interface ConfigAntfuOptions extends OptionsOverrides {
14727
- }
14728
- interface ConfigNtnyqOptions extends OptionsOverrides {
14729
- }
14730
- interface ConfigStylisticOptions extends OptionsOverrides {
14731
- }
14732
- interface ConfigGitHubActionOptions extends OptionsOverrides {
14733
- }
14734
- interface ConfigPrettierOptions extends OptionsOverrides {
14735
- /**
14736
- * Prettier level
14737
- *
14738
- * @default 'warn'
14739
- */
14740
- level?: 'warn' | 'error';
14741
- /**
14742
- * Glob of built-in disabled files
14743
- */
14744
- disabledFiles?: string[];
14745
- /**
14746
- * Glob of user custom disabled files
14747
- * @default []
14748
- */
14749
- userDisabledFiles?: string[];
14750
- }
14751
- type PerfectionistSortType = 'alphabetical' | 'line-length' | 'natural';
14752
- type PerfectionistSortOrder = 'asc' | 'desc';
14753
- interface ConfigPerfectionistOptions extends OptionsOverrides {
14754
- imports?: {
14755
- type?: PerfectionistSortType;
14756
- order?: PerfectionistSortOrder;
14757
- };
14758
- exports?: {
14759
- type?: PerfectionistSortType;
14760
- order?: PerfectionistSortOrder;
14761
- };
14762
- namedExports?: {
14763
- type?: PerfectionistSortType;
14764
- order?: PerfectionistSortOrder;
14765
- };
14766
- namedImports?: {
14767
- type?: PerfectionistSortType;
14768
- order?: PerfectionistSortOrder;
14769
- };
14770
- }
14771
- interface ConfigCommentsOptions extends OptionsOverrides {
14772
- }
14773
- interface ConfigRegexpOptions extends OptionsOverrides {
14792
+ interface ConfigTestOptions extends OptionsOverrides {
14774
14793
  /**
14775
- * Prettier level
14776
- *
14777
- * @default 'error'
14794
+ * Overrides built-in vitest rules
14778
14795
  */
14779
- level?: 'warn' | 'error';
14796
+ overridesVitestRules?: TypedConfigItem['rules'];
14780
14797
  }
14781
14798
  interface ConfigJavaScriptOptions extends OptionsOverrides {
14782
14799
  /**
@@ -14786,30 +14803,14 @@ interface ConfigJavaScriptOptions extends OptionsOverrides {
14786
14803
  */
14787
14804
  strict?: boolean;
14788
14805
  }
14789
- interface ConfigTypeScriptOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
14790
- /**
14791
- * Enable type aware check for TypeScript files
14792
- */
14793
- tsconfigPath?: string;
14794
- /**
14795
- * Additional parser options
14796
- */
14797
- parserOptions?: TSESLintParserOptions;
14798
- /**
14799
- * Glob patterns for files that should be type aware.
14800
- * @default ['**\/*.{ts,tsx}']
14801
- */
14802
- filesTypeAware?: string[];
14803
- /**
14804
- * Glob patterns for files that should not be type aware.
14805
- * @default ['**\/*.md\/**', '**\/*.astro/*.ts']
14806
- */
14807
- ignoresTypeAware?: string[];
14806
+ type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
14808
14807
  /**
14809
- * Overrides built-in type aware rules
14808
+ * Throw an error if gitignore file not found.
14809
+ *
14810
+ * @default false
14810
14811
  */
14811
- overridesTypeAwareRules?: TypedConfigItem['rules'];
14812
- }
14812
+ strict?: boolean;
14813
+ };
14813
14814
  interface ConfigSortOptions {
14814
14815
  /**
14815
14816
  * @default true
@@ -14828,15 +14829,24 @@ interface ConfigSortOptions {
14828
14829
  */
14829
14830
  pnpmWorkspace?: boolean;
14830
14831
  }
14831
- interface ConfigJsoncOptions extends OptionsOverrides {
14832
- }
14833
- interface ConfigYmlOptions extends OptionsOverrides {
14834
- }
14835
- interface ConfigMarkdownOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
14836
- }
14837
- interface ConfigTomlOptions extends OptionsOverrides {
14832
+ interface ConfigPrettierOptions extends OptionsOverrides {
14833
+ /**
14834
+ * Prettier level
14835
+ *
14836
+ * @default 'warn'
14837
+ */
14838
+ level?: 'warn' | 'error';
14839
+ /**
14840
+ * Glob of built-in disabled files
14841
+ */
14842
+ disabledFiles?: string[];
14843
+ /**
14844
+ * Glob of user custom disabled files
14845
+ * @default []
14846
+ */
14847
+ userDisabledFiles?: string[];
14838
14848
  }
14839
- interface ConfigVueOptions extends OptionsOverrides, OptionsFiles, OptionsFeatures {
14849
+ interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrides {
14840
14850
  /**
14841
14851
  * Create virtual files for Vue SFC blocks to enable linting.
14842
14852
  *
@@ -14851,11 +14861,27 @@ interface ConfigVueOptions extends OptionsOverrides, OptionsFiles, OptionsFeatur
14851
14861
  */
14852
14862
  vueVersion?: 2 | 3;
14853
14863
  }
14854
- interface ConfigTestOptions extends OptionsOverrides {
14864
+ interface ConfigSpecialsOptions {
14855
14865
  /**
14856
- * Overrides built-in vitest rules
14866
+ * Overrides scripts rules
14857
14867
  */
14858
- overridesVitestRules?: TypedConfigItem['rules'];
14868
+ overridesScriptsRules?: TypedConfigItem['rules'];
14869
+ /**
14870
+ * Overrides cli rules
14871
+ */
14872
+ overridesCliRules?: TypedConfigItem['rules'];
14873
+ /**
14874
+ * Overrides user scripts rules
14875
+ */
14876
+ overridesUserScriptsRules?: TypedConfigItem['rules'];
14877
+ /**
14878
+ * Overrides config files rules
14879
+ */
14880
+ overridesConfigFileRules?: TypedConfigItem['rules'];
14881
+ /**
14882
+ * More special case configs
14883
+ */
14884
+ specialCaseConfigs?: TypedConfigItem[];
14859
14885
  }
14860
14886
  interface ConfigFormatOptions {
14861
14887
  /**
@@ -14863,19 +14889,19 @@ interface ConfigFormatOptions {
14863
14889
  *
14864
14890
  * @default 'prettier'
14865
14891
  */
14866
- css?: 'prettier' | boolean;
14892
+ css?: boolean | 'prettier';
14867
14893
  /**
14868
14894
  * Enable formatter support for html
14869
14895
  *
14870
14896
  * @default 'prettier'
14871
14897
  */
14872
- html?: 'prettier' | boolean;
14898
+ html?: boolean | 'prettier';
14873
14899
  /**
14874
14900
  * Enable formatter support for markdown
14875
14901
  *
14876
14902
  * @default 'prettier'
14877
14903
  */
14878
- markdown?: 'prettier' | 'dprint' | boolean;
14904
+ markdown?: boolean | 'dprint' | 'prettier';
14879
14905
  /**
14880
14906
  * Options for prettier
14881
14907
  */
@@ -14885,21 +14911,61 @@ interface ConfigFormatOptions {
14885
14911
  */
14886
14912
  dprintOptions?: boolean;
14887
14913
  }
14888
- interface ConfigUnusedImportsOptions extends OptionsOverrides {
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'];
14941
+ /**
14942
+ * Overrides rules for `types`
14943
+ */
14944
+ overridesTypesRules?: TypedConfigItem['rules'];
14889
14945
  }
14890
- interface ConfigOptionsInternal {
14946
+ interface ConfigTypeScriptOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
14891
14947
  /**
14892
- * @internal
14948
+ * Enable type aware check for TypeScript files
14893
14949
  */
14894
- format?: boolean | ConfigFormatOptions;
14950
+ tsconfigPath?: string;
14895
14951
  /**
14896
- * @internal
14952
+ * Additional parser options
14897
14953
  */
14898
- ntnyq?: boolean | ConfigNtnyqOptions;
14954
+ parserOptions?: TSESLintParserOptions;
14899
14955
  /**
14900
- * @internal
14956
+ * Glob patterns for files that should be type aware.
14957
+ * @default ['**\/*.{ts,tsx}']
14901
14958
  */
14902
- unusedImports?: boolean | ConfigUnusedImportsOptions;
14959
+ filesTypeAware?: string[];
14960
+ /**
14961
+ * Glob patterns for files that should not be type aware.
14962
+ * @default ['**\/*.md\/**', '**\/*.astro/*.ts']
14963
+ */
14964
+ ignoresTypeAware?: string[];
14965
+ /**
14966
+ * Overrides built-in type aware rules
14967
+ */
14968
+ overridesTypeAwareRules?: TypedConfigItem['rules'];
14903
14969
  }
14904
14970
  /**
14905
14971
  * Config factory options
@@ -14912,6 +14978,7 @@ interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions {
14912
14978
  command?: ConfigCommandOptions;
14913
14979
  comments?: ConfigCommentsOptions;
14914
14980
  javascript?: ConfigJavaScriptOptions;
14981
+ specials?: ConfigSpecialsOptions;
14915
14982
  sort?: boolean | ConfigSortOptions;
14916
14983
  gitignore?: boolean | ConfigGitIgnoreOptions;
14917
14984
  stylistic?: boolean | ConfigStylisticOptions;
@@ -14930,11 +14997,25 @@ interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions {
14930
14997
  antfu?: boolean | ConfigAntfuOptions;
14931
14998
  githubAction?: boolean | ConfigGitHubActionOptions;
14932
14999
  }
15000
+ interface ConfigOptionsInternal {
15001
+ /**
15002
+ * @internal
15003
+ */
15004
+ format?: boolean | ConfigFormatOptions;
15005
+ /**
15006
+ * @internal
15007
+ */
15008
+ ntnyq?: boolean | ConfigNtnyqOptions;
15009
+ /**
15010
+ * @internal
15011
+ */
15012
+ unusedImports?: boolean | ConfigUnusedImportsOptions;
15013
+ }
14933
15014
 
14934
15015
  /**
14935
15016
  * Prettier options
14936
15017
  */
14937
- type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'tabWidth' | 'rangeEnd' | 'proseWrap' | 'endOfLine' | 'rangeStart' | 'quoteProps' | 'printWidth' | 'arrowParens' | 'singleQuote' | 'insertPragma' | 'trailingComma' | 'requirePragma' | 'bracketSpacing' | 'jsxSingleQuote' | 'bracketSameLine' | 'singleAttributePerLine' | 'experimentalTernaries' | 'vueIndentScriptAndStyle' | 'embeddedLanguageFormatting' | 'htmlWhitespaceSensitivity' | 'plugins'>> & {
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'>> & {
14938
15019
  parser?: BuiltInParserName;
14939
15020
  };
14940
15021
 
@@ -14945,7 +15026,7 @@ type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'tabWi
14945
15026
  /**
14946
15027
  * Config factory
14947
15028
  */
14948
- declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]): Promise<FlatConfigComposer<TypedConfigItem, ConfigNames>>;
15029
+ declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]): FlatConfigComposer<TypedConfigItem, ConfigNames>;
14949
15030
 
14950
15031
  /**
14951
15032
  * @file globs constants
@@ -14957,6 +15038,7 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
14957
15038
  declare const GLOB_TS = "**/*.?([cm])ts";
14958
15039
  declare const GLOB_TSX = "**/*.?([cm])tsx";
14959
15040
  declare const GLOB_DTS = "**/*.d.?([cm])ts";
15041
+ declare const GLOB_TYPES: string[];
14960
15042
  declare const GLOB_TEST: string[];
14961
15043
  declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
14962
15044
  declare const GLOB_CSS = "**/*.css";
@@ -15014,24 +15096,12 @@ declare function resolveSubOptions<K extends keyof ConfigOptions>(options: Confi
15014
15096
 
15015
15097
  declare function mergePrettierOptions(options?: PrettierOptions, overrides?: PrettierOptions): PrettierOptions;
15016
15098
 
15017
- /**
15018
- * @file ESLint parsers
15019
- */
15020
-
15021
15099
  /**
15022
15100
  * With meta
15023
15101
  */
15024
15102
  declare const parserTypeScript: {
15025
- meta?: {
15026
- name?: string | undefined;
15027
- version?: string | undefined;
15028
- };
15029
- parseForESLint(text: string, options?: unknown): {
15030
- ast: unknown;
15031
- scopeManager?: unknown;
15032
- services?: unknown;
15033
- visitorKeys?: unknown;
15034
- };
15103
+ meta?: { [K in keyof _typescript_eslint_utils_ts_eslint.Parser.ParserMeta]?: _typescript_eslint_utils_ts_eslint.Parser.ParserMeta[K] | undefined; };
15104
+ parseForESLint(text: string, options?: unknown): { [k in keyof _typescript_eslint_utils_ts_eslint.Parser.ParseResult]: unknown; };
15035
15105
  };
15036
15106
 
15037
15107
  /**
@@ -15082,7 +15152,7 @@ declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
15082
15152
 
15083
15153
  declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
15084
15154
 
15085
- declare const specials: () => TypedConfigItem[];
15155
+ declare const specials: (options?: ConfigSpecialsOptions) => TypedConfigItem[];
15086
15156
 
15087
15157
  declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
15088
15158
 
@@ -15110,4 +15180,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
15110
15180
  */
15111
15181
  declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
15112
15182
 
15113
- 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 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_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PerfectionistSortOrder, type PerfectionistSortType, 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 };
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 };