@ntnyq/eslint-config 3.6.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/README.md +2 -0
- package/dist/index.cjs +304 -120
- package/dist/index.d.cts +212 -160
- package/dist/index.d.ts +212 -160
- package/dist/index.js +303 -120
- package/package.json +10 -10
package/dist/index.d.cts
CHANGED
|
@@ -50,24 +50,16 @@ type Arrayable<T> = T | T[];
|
|
|
50
50
|
/**
|
|
51
51
|
* Promise or not
|
|
52
52
|
*/
|
|
53
|
-
type Awaitable<T> = T |
|
|
53
|
+
type Awaitable<T> = Promise<T> | T;
|
|
54
54
|
/**
|
|
55
55
|
* Make types human readable
|
|
56
56
|
*/
|
|
57
|
-
type Pretty<T> = {
|
|
58
|
-
[P in keyof T]: T[P];
|
|
59
|
-
} & {};
|
|
60
|
-
/**
|
|
61
|
-
* A literal type that supports custom further strings but preserves autocompletion in IDEs.
|
|
62
|
-
*
|
|
63
|
-
* @see https://github.com/microsoft/TypeScript/issues/29729#issuecomment-471566609
|
|
64
|
-
*/
|
|
65
|
-
type LiteralUnion<Union extends Base, Base = string> = Union | (Base & {
|
|
66
|
-
zz_IGNORE_ME?: never;
|
|
67
|
-
});
|
|
68
57
|
type InteropModuleDefault<T> = T extends {
|
|
69
58
|
default: infer U;
|
|
70
59
|
} ? U : T;
|
|
60
|
+
type Pretty<T> = {
|
|
61
|
+
[P in keyof T]: T[P];
|
|
62
|
+
} & {};
|
|
71
63
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
72
64
|
|
|
73
65
|
interface RuleOptions {
|
|
@@ -1549,6 +1541,11 @@ interface RuleOptions {
|
|
|
1549
1541
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/max-jobs-per-action.html
|
|
1550
1542
|
*/
|
|
1551
1543
|
'github-action/max-jobs-per-action'?: Linter.RuleEntry<GithubActionMaxJobsPerAction>;
|
|
1544
|
+
/**
|
|
1545
|
+
* disallow using top level env.
|
|
1546
|
+
* @see https://eslint-plugin-github-action.ntnyq.com/rules/no-top-level-env.html
|
|
1547
|
+
*/
|
|
1548
|
+
'github-action/no-top-level-env'?: Linter.RuleEntry<[]>;
|
|
1552
1549
|
/**
|
|
1553
1550
|
* disallow using top level permissions.
|
|
1554
1551
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/no-top-level-permissions.html
|
|
@@ -1559,6 +1556,16 @@ interface RuleOptions {
|
|
|
1559
1556
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/require-action-name.html
|
|
1560
1557
|
*/
|
|
1561
1558
|
'github-action/require-action-name'?: Linter.RuleEntry<[]>;
|
|
1559
|
+
/**
|
|
1560
|
+
* require job name to be set.
|
|
1561
|
+
* @see https://eslint-plugin-github-action.ntnyq.com/rules/require-job-name.html
|
|
1562
|
+
*/
|
|
1563
|
+
'github-action/require-job-name'?: Linter.RuleEntry<[]>;
|
|
1564
|
+
/**
|
|
1565
|
+
* require job step name to be set.
|
|
1566
|
+
* @see https://eslint-plugin-github-action.ntnyq.com/rules/require-job-step-name.html
|
|
1567
|
+
*/
|
|
1568
|
+
'github-action/require-job-step-name'?: Linter.RuleEntry<[]>;
|
|
1562
1569
|
/**
|
|
1563
1570
|
* Require `require()` calls to be placed at top-level module scope
|
|
1564
1571
|
* @see https://eslint.org/docs/latest/rules/global-require
|
|
@@ -2583,7 +2590,7 @@ interface RuleOptions {
|
|
|
2583
2590
|
*/
|
|
2584
2591
|
'no-class-assign'?: Linter.RuleEntry<[]>;
|
|
2585
2592
|
/**
|
|
2586
|
-
* Disallow comparing against
|
|
2593
|
+
* Disallow comparing against `-0`
|
|
2587
2594
|
* @see https://eslint.org/docs/latest/rules/no-compare-neg-zero
|
|
2588
2595
|
*/
|
|
2589
2596
|
'no-compare-neg-zero'?: Linter.RuleEntry<[]>;
|
|
@@ -5948,7 +5955,7 @@ interface RuleOptions {
|
|
|
5948
5955
|
* enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`
|
|
5949
5956
|
* @see https://eslint.vuejs.org/rules/no-duplicate-attr-inheritance.html
|
|
5950
5957
|
*/
|
|
5951
|
-
'vue/no-duplicate-attr-inheritance'?: Linter.RuleEntry<
|
|
5958
|
+
'vue/no-duplicate-attr-inheritance'?: Linter.RuleEntry<VueNoDuplicateAttrInheritance>;
|
|
5952
5959
|
/**
|
|
5953
5960
|
* disallow duplication of attributes
|
|
5954
5961
|
* @see https://eslint.vuejs.org/rules/no-duplicate-attributes.html
|
|
@@ -6393,7 +6400,7 @@ interface RuleOptions {
|
|
|
6393
6400
|
*/
|
|
6394
6401
|
'vue/prefer-true-attribute-shorthand'?: Linter.RuleEntry<VuePreferTrueAttributeShorthand>;
|
|
6395
6402
|
/**
|
|
6396
|
-
* require using `useTemplateRef` instead of `ref` for template refs
|
|
6403
|
+
* require using `useTemplateRef` instead of `ref`/`shallowRef` for template refs
|
|
6397
6404
|
* @see https://eslint.vuejs.org/rules/prefer-use-template-ref.html
|
|
6398
6405
|
*/
|
|
6399
6406
|
'vue/prefer-use-template-ref'?: Linter.RuleEntry<[]>;
|
|
@@ -6507,6 +6514,11 @@ interface RuleOptions {
|
|
|
6507
6514
|
* @see https://eslint.vuejs.org/rules/require-valid-default-prop.html
|
|
6508
6515
|
*/
|
|
6509
6516
|
'vue/require-valid-default-prop'?: Linter.RuleEntry<[]>;
|
|
6517
|
+
/**
|
|
6518
|
+
* enforce using only specific component names
|
|
6519
|
+
* @see https://eslint.vuejs.org/rules/restricted-component-names.html
|
|
6520
|
+
*/
|
|
6521
|
+
'vue/restricted-component-names'?: Linter.RuleEntry<VueRestrictedComponentNames>;
|
|
6510
6522
|
/**
|
|
6511
6523
|
* enforce that a return statement is present in computed property
|
|
6512
6524
|
* @see https://eslint.vuejs.org/rules/return-in-computed-property.html
|
|
@@ -6533,6 +6545,11 @@ interface RuleOptions {
|
|
|
6533
6545
|
* @see https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html
|
|
6534
6546
|
*/
|
|
6535
6547
|
'vue/singleline-html-element-content-newline'?: Linter.RuleEntry<VueSinglelineHtmlElementContentNewline>;
|
|
6548
|
+
/**
|
|
6549
|
+
* enforce specific casing for slot names
|
|
6550
|
+
* @see https://eslint.vuejs.org/rules/slot-name-casing.html
|
|
6551
|
+
*/
|
|
6552
|
+
'vue/slot-name-casing'?: Linter.RuleEntry<VueSlotNameCasing>;
|
|
6536
6553
|
/**
|
|
6537
6554
|
* enforce sort-keys in a manner that is compatible with order-in-components
|
|
6538
6555
|
* @see https://eslint.vuejs.org/rules/sort-keys.html
|
|
@@ -12503,6 +12520,7 @@ type SortKeys = [] | [("asc" | "desc")] | [
|
|
|
12503
12520
|
natural?: boolean;
|
|
12504
12521
|
minKeys?: number;
|
|
12505
12522
|
allowLineSeparatedGroups?: boolean;
|
|
12523
|
+
ignoreComputedKeys?: boolean;
|
|
12506
12524
|
}
|
|
12507
12525
|
];
|
|
12508
12526
|
type SortVars = [] | [
|
|
@@ -13126,6 +13144,7 @@ type VueAttributeHyphenation = [] | [("always" | "never")] | [
|
|
|
13126
13144
|
} & {
|
|
13127
13145
|
[k: string]: unknown | undefined;
|
|
13128
13146
|
})[];
|
|
13147
|
+
ignoreTags?: string[];
|
|
13129
13148
|
}
|
|
13130
13149
|
];
|
|
13131
13150
|
type VueAttributesOrder = [] | [
|
|
@@ -13896,6 +13915,11 @@ type VueNoDupeKeys = [] | [
|
|
|
13896
13915
|
groups?: unknown[];
|
|
13897
13916
|
}
|
|
13898
13917
|
];
|
|
13918
|
+
type VueNoDuplicateAttrInheritance = [] | [
|
|
13919
|
+
{
|
|
13920
|
+
checkMultiRootNodes?: boolean;
|
|
13921
|
+
}
|
|
13922
|
+
];
|
|
13899
13923
|
type VueNoDuplicateAttributes = [] | [
|
|
13900
13924
|
{
|
|
13901
13925
|
allowCoexistClass?: boolean;
|
|
@@ -14142,6 +14166,7 @@ type VueNoUselessVBind = [] | [
|
|
|
14142
14166
|
type VueNoVTextVHtmlOnComponent = [] | [
|
|
14143
14167
|
{
|
|
14144
14168
|
allow?: string[];
|
|
14169
|
+
ignoreElementNamespaces?: boolean;
|
|
14145
14170
|
}
|
|
14146
14171
|
];
|
|
14147
14172
|
type VueObjectCurlyNewline = [] | [
|
|
@@ -14281,6 +14306,11 @@ type VueRequireToggleInsideTransition = [] | [
|
|
|
14281
14306
|
additionalDirectives?: string[];
|
|
14282
14307
|
}
|
|
14283
14308
|
];
|
|
14309
|
+
type VueRestrictedComponentNames = [] | [
|
|
14310
|
+
{
|
|
14311
|
+
allow?: string[];
|
|
14312
|
+
}
|
|
14313
|
+
];
|
|
14284
14314
|
type VueReturnInComputedProperty = [] | [
|
|
14285
14315
|
{
|
|
14286
14316
|
treatUndefinedAsUnspecified?: boolean;
|
|
@@ -14306,6 +14336,7 @@ type VueSinglelineHtmlElementContentNewline = [] | [
|
|
|
14306
14336
|
externalIgnores?: string[];
|
|
14307
14337
|
}
|
|
14308
14338
|
];
|
|
14339
|
+
type VueSlotNameCasing = [] | [("camelCase" | "kebab-case" | "singleword")];
|
|
14309
14340
|
type VueSortKeys = [] | [("asc" | "desc")] | [
|
|
14310
14341
|
("asc" | "desc"),
|
|
14311
14342
|
{
|
|
@@ -14355,6 +14386,7 @@ type VueVOnEventHyphenation = [] | [("always" | "never")] | [
|
|
|
14355
14386
|
} & {
|
|
14356
14387
|
[k: string]: unknown | undefined;
|
|
14357
14388
|
})[];
|
|
14389
|
+
ignoreTags?: string[];
|
|
14358
14390
|
}
|
|
14359
14391
|
];
|
|
14360
14392
|
type VueVOnFunctionCall = [] | [("always" | "never")] | [
|
|
@@ -14640,17 +14672,8 @@ type Yoda = [] | [("always" | "never")] | [
|
|
|
14640
14672
|
onlyEquality?: boolean;
|
|
14641
14673
|
}
|
|
14642
14674
|
];
|
|
14643
|
-
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';
|
|
14675
|
+
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';
|
|
14644
14676
|
|
|
14645
|
-
/**
|
|
14646
|
-
* Typed flat config item
|
|
14647
|
-
*/
|
|
14648
|
-
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'plugins'> & {
|
|
14649
|
-
/**
|
|
14650
|
-
* Most plugin are not properly typed
|
|
14651
|
-
*/
|
|
14652
|
-
plugins?: Record<string, any>;
|
|
14653
|
-
};
|
|
14654
14677
|
/**
|
|
14655
14678
|
* ESLint config
|
|
14656
14679
|
*/
|
|
@@ -14671,26 +14694,65 @@ type ESLintParserOptions = Linter.ParserOptions;
|
|
|
14671
14694
|
* TypeScript ESLint parserOptions
|
|
14672
14695
|
*/
|
|
14673
14696
|
type TSESLintParserOptions = Pretty<Required<Required<ConfigWithExtends>['languageOptions']>['parserOptions']>;
|
|
14697
|
+
/**
|
|
14698
|
+
* Typed flat config item
|
|
14699
|
+
*/
|
|
14700
|
+
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'plugins'> & {
|
|
14701
|
+
/**
|
|
14702
|
+
* Most plugin are not properly typed
|
|
14703
|
+
*/
|
|
14704
|
+
plugins?: Record<string, any>;
|
|
14705
|
+
};
|
|
14674
14706
|
|
|
14675
14707
|
/**
|
|
14676
14708
|
* @file Config options
|
|
14677
14709
|
*/
|
|
14678
14710
|
|
|
14711
|
+
type ConfigIgnoresOptions = string[];
|
|
14679
14712
|
/**
|
|
14680
14713
|
* Options for overrides `files`
|
|
14681
14714
|
*/
|
|
14715
|
+
type ConfigCommandOptions = ESLintPluginCommandOptions;
|
|
14716
|
+
interface ConfigYmlOptions extends OptionsOverrides {
|
|
14717
|
+
}
|
|
14682
14718
|
interface OptionsFiles {
|
|
14683
14719
|
files?: string[];
|
|
14684
14720
|
}
|
|
14685
14721
|
/**
|
|
14686
14722
|
* Options for add `extensions` support
|
|
14687
14723
|
*/
|
|
14724
|
+
interface ConfigAntfuOptions extends OptionsOverrides {
|
|
14725
|
+
}
|
|
14726
|
+
interface ConfigCommentsOptions extends OptionsOverrides {
|
|
14727
|
+
}
|
|
14728
|
+
interface ConfigGitHubActionOptions extends OptionsOverrides {
|
|
14729
|
+
}
|
|
14730
|
+
interface ConfigImportsOptions extends OptionsOverrides {
|
|
14731
|
+
}
|
|
14732
|
+
interface ConfigJsdocOptions extends OptionsFeatures, OptionsOverrides {
|
|
14733
|
+
}
|
|
14734
|
+
interface ConfigJsoncOptions extends OptionsOverrides {
|
|
14735
|
+
}
|
|
14736
|
+
interface ConfigNodeOptions extends OptionsOverrides {
|
|
14737
|
+
}
|
|
14738
|
+
interface ConfigNtnyqOptions extends OptionsOverrides {
|
|
14739
|
+
}
|
|
14740
|
+
interface ConfigStylisticOptions extends OptionsOverrides {
|
|
14741
|
+
}
|
|
14742
|
+
interface ConfigTomlOptions extends OptionsOverrides {
|
|
14743
|
+
}
|
|
14744
|
+
interface ConfigUnicornOptions extends OptionsOverrides {
|
|
14745
|
+
}
|
|
14746
|
+
interface ConfigUnusedImportsOptions extends OptionsOverrides {
|
|
14747
|
+
}
|
|
14688
14748
|
interface OptionsExtensions {
|
|
14689
14749
|
extensions?: string[];
|
|
14690
14750
|
}
|
|
14691
14751
|
/**
|
|
14692
14752
|
* Options for add `features` support
|
|
14693
14753
|
*/
|
|
14754
|
+
interface ConfigMarkdownOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
|
|
14755
|
+
}
|
|
14694
14756
|
type OptionsFeatures = {
|
|
14695
14757
|
/**
|
|
14696
14758
|
* Enable typescript support
|
|
@@ -14700,10 +14762,34 @@ type OptionsFeatures = {
|
|
|
14700
14762
|
/**
|
|
14701
14763
|
* Options for overrides `rules`
|
|
14702
14764
|
*/
|
|
14703
|
-
interface
|
|
14704
|
-
|
|
14765
|
+
interface ConfigFormatOptions {
|
|
14766
|
+
/**
|
|
14767
|
+
* Enable formatter support for css, less, scss, sass and etc.
|
|
14768
|
+
*
|
|
14769
|
+
* @default 'prettier'
|
|
14770
|
+
*/
|
|
14771
|
+
css?: 'prettier' | boolean;
|
|
14772
|
+
/**
|
|
14773
|
+
* Enable formatter support for html
|
|
14774
|
+
*
|
|
14775
|
+
* @default 'prettier'
|
|
14776
|
+
*/
|
|
14777
|
+
html?: 'prettier' | boolean;
|
|
14778
|
+
/**
|
|
14779
|
+
* Enable formatter support for markdown
|
|
14780
|
+
*
|
|
14781
|
+
* @default 'prettier'
|
|
14782
|
+
*/
|
|
14783
|
+
markdown?: 'dprint' | 'prettier' | boolean;
|
|
14784
|
+
/**
|
|
14785
|
+
* Options for prettier
|
|
14786
|
+
*/
|
|
14787
|
+
prettierOptions?: PrettierOptions;
|
|
14788
|
+
/**
|
|
14789
|
+
* Options for dprint
|
|
14790
|
+
*/
|
|
14791
|
+
dprintOptions?: boolean;
|
|
14705
14792
|
}
|
|
14706
|
-
type ConfigIgnoresOptions = string[];
|
|
14707
14793
|
type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
|
|
14708
14794
|
/**
|
|
14709
14795
|
* Throw an error if gitignore file not found.
|
|
@@ -14712,30 +14798,45 @@ type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
|
|
|
14712
14798
|
*/
|
|
14713
14799
|
strict?: boolean;
|
|
14714
14800
|
};
|
|
14715
|
-
|
|
14716
|
-
interface ConfigJsdocOptions extends OptionsOverrides, OptionsFeatures {
|
|
14717
|
-
}
|
|
14718
|
-
interface ConfigUnoCSSOptions extends OptionsOverrides {
|
|
14801
|
+
interface ConfigJavaScriptOptions extends OptionsOverrides {
|
|
14719
14802
|
/**
|
|
14720
|
-
* Enable
|
|
14803
|
+
* Enable strict checking for JavaScript files
|
|
14721
14804
|
*
|
|
14722
14805
|
* @default false
|
|
14723
14806
|
*/
|
|
14724
|
-
|
|
14725
|
-
}
|
|
14726
|
-
interface ConfigUnicornOptions extends OptionsOverrides {
|
|
14727
|
-
}
|
|
14728
|
-
interface ConfigImportsOptions extends OptionsOverrides {
|
|
14729
|
-
}
|
|
14730
|
-
interface ConfigNodeOptions extends OptionsOverrides {
|
|
14731
|
-
}
|
|
14732
|
-
interface ConfigAntfuOptions extends OptionsOverrides {
|
|
14733
|
-
}
|
|
14734
|
-
interface ConfigNtnyqOptions extends OptionsOverrides {
|
|
14735
|
-
}
|
|
14736
|
-
interface ConfigStylisticOptions extends OptionsOverrides {
|
|
14807
|
+
strict?: boolean;
|
|
14737
14808
|
}
|
|
14738
|
-
interface
|
|
14809
|
+
interface ConfigPerfectionistOptions extends OptionsOverrides {
|
|
14810
|
+
/**
|
|
14811
|
+
* Enable sort `constants`
|
|
14812
|
+
*
|
|
14813
|
+
* @default true
|
|
14814
|
+
*/
|
|
14815
|
+
sortConstants?: boolean;
|
|
14816
|
+
/**
|
|
14817
|
+
* Enable sort `enums`
|
|
14818
|
+
*
|
|
14819
|
+
* @default true
|
|
14820
|
+
*/
|
|
14821
|
+
sortEnums?: boolean;
|
|
14822
|
+
/**
|
|
14823
|
+
* Enable sort `types`
|
|
14824
|
+
*
|
|
14825
|
+
* @default true
|
|
14826
|
+
*/
|
|
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'];
|
|
14739
14840
|
}
|
|
14740
14841
|
interface ConfigPrettierOptions extends OptionsOverrides {
|
|
14741
14842
|
/**
|
|
@@ -14743,7 +14844,7 @@ interface ConfigPrettierOptions extends OptionsOverrides {
|
|
|
14743
14844
|
*
|
|
14744
14845
|
* @default 'warn'
|
|
14745
14846
|
*/
|
|
14746
|
-
level?: '
|
|
14847
|
+
level?: 'error' | 'warn';
|
|
14747
14848
|
/**
|
|
14748
14849
|
* Glob of built-in disabled files
|
|
14749
14850
|
*/
|
|
@@ -14754,67 +14855,13 @@ interface ConfigPrettierOptions extends OptionsOverrides {
|
|
|
14754
14855
|
*/
|
|
14755
14856
|
userDisabledFiles?: string[];
|
|
14756
14857
|
}
|
|
14757
|
-
type PerfectionistSortType = 'alphabetical' | 'line-length' | 'natural';
|
|
14758
|
-
type PerfectionistSortOrder = 'asc' | 'desc';
|
|
14759
|
-
interface ConfigPerfectionistOptions extends OptionsOverrides {
|
|
14760
|
-
imports?: {
|
|
14761
|
-
type?: PerfectionistSortType;
|
|
14762
|
-
order?: PerfectionistSortOrder;
|
|
14763
|
-
};
|
|
14764
|
-
exports?: {
|
|
14765
|
-
type?: PerfectionistSortType;
|
|
14766
|
-
order?: PerfectionistSortOrder;
|
|
14767
|
-
};
|
|
14768
|
-
namedExports?: {
|
|
14769
|
-
type?: PerfectionistSortType;
|
|
14770
|
-
order?: PerfectionistSortOrder;
|
|
14771
|
-
};
|
|
14772
|
-
namedImports?: {
|
|
14773
|
-
type?: PerfectionistSortType;
|
|
14774
|
-
order?: PerfectionistSortOrder;
|
|
14775
|
-
};
|
|
14776
|
-
}
|
|
14777
|
-
interface ConfigCommentsOptions extends OptionsOverrides {
|
|
14778
|
-
}
|
|
14779
14858
|
interface ConfigRegexpOptions extends OptionsOverrides {
|
|
14780
14859
|
/**
|
|
14781
14860
|
* Prettier level
|
|
14782
14861
|
*
|
|
14783
14862
|
* @default 'error'
|
|
14784
14863
|
*/
|
|
14785
|
-
level?: '
|
|
14786
|
-
}
|
|
14787
|
-
interface ConfigJavaScriptOptions extends OptionsOverrides {
|
|
14788
|
-
/**
|
|
14789
|
-
* Enable strict checking for JavaScript files
|
|
14790
|
-
*
|
|
14791
|
-
* @default false
|
|
14792
|
-
*/
|
|
14793
|
-
strict?: boolean;
|
|
14794
|
-
}
|
|
14795
|
-
interface ConfigTypeScriptOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
|
|
14796
|
-
/**
|
|
14797
|
-
* Enable type aware check for TypeScript files
|
|
14798
|
-
*/
|
|
14799
|
-
tsconfigPath?: string;
|
|
14800
|
-
/**
|
|
14801
|
-
* Additional parser options
|
|
14802
|
-
*/
|
|
14803
|
-
parserOptions?: TSESLintParserOptions;
|
|
14804
|
-
/**
|
|
14805
|
-
* Glob patterns for files that should be type aware.
|
|
14806
|
-
* @default ['**\/*.{ts,tsx}']
|
|
14807
|
-
*/
|
|
14808
|
-
filesTypeAware?: string[];
|
|
14809
|
-
/**
|
|
14810
|
-
* Glob patterns for files that should not be type aware.
|
|
14811
|
-
* @default ['**\/*.md\/**', '**\/*.astro/*.ts']
|
|
14812
|
-
*/
|
|
14813
|
-
ignoresTypeAware?: string[];
|
|
14814
|
-
/**
|
|
14815
|
-
* Overrides built-in type aware rules
|
|
14816
|
-
*/
|
|
14817
|
-
overridesTypeAwareRules?: TypedConfigItem['rules'];
|
|
14864
|
+
level?: 'error' | 'warn';
|
|
14818
14865
|
}
|
|
14819
14866
|
interface ConfigSortOptions {
|
|
14820
14867
|
/**
|
|
@@ -14834,35 +14881,6 @@ interface ConfigSortOptions {
|
|
|
14834
14881
|
*/
|
|
14835
14882
|
pnpmWorkspace?: boolean;
|
|
14836
14883
|
}
|
|
14837
|
-
interface ConfigJsoncOptions extends OptionsOverrides {
|
|
14838
|
-
}
|
|
14839
|
-
interface ConfigYmlOptions extends OptionsOverrides {
|
|
14840
|
-
}
|
|
14841
|
-
interface ConfigMarkdownOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
|
|
14842
|
-
}
|
|
14843
|
-
interface ConfigTomlOptions extends OptionsOverrides {
|
|
14844
|
-
}
|
|
14845
|
-
interface ConfigVueOptions extends OptionsOverrides, OptionsFiles, OptionsFeatures {
|
|
14846
|
-
/**
|
|
14847
|
-
* Create virtual files for Vue SFC blocks to enable linting.
|
|
14848
|
-
*
|
|
14849
|
-
* @see https://github.com/antfu/eslint-processor-vue-blocks
|
|
14850
|
-
* @default true
|
|
14851
|
-
*/
|
|
14852
|
-
sfcBlocks?: boolean | Options;
|
|
14853
|
-
/**
|
|
14854
|
-
* Vue version
|
|
14855
|
-
*
|
|
14856
|
-
* @default 3
|
|
14857
|
-
*/
|
|
14858
|
-
vueVersion?: 2 | 3;
|
|
14859
|
-
}
|
|
14860
|
-
interface ConfigTestOptions extends OptionsOverrides {
|
|
14861
|
-
/**
|
|
14862
|
-
* Overrides built-in vitest rules
|
|
14863
|
-
*/
|
|
14864
|
-
overridesVitestRules?: TypedConfigItem['rules'];
|
|
14865
|
-
}
|
|
14866
14884
|
interface ConfigSpecialsOptions {
|
|
14867
14885
|
/**
|
|
14868
14886
|
* Overrides scripts rules
|
|
@@ -14876,54 +14894,70 @@ interface ConfigSpecialsOptions {
|
|
|
14876
14894
|
* Overrides user scripts rules
|
|
14877
14895
|
*/
|
|
14878
14896
|
overridesUserScriptsRules?: TypedConfigItem['rules'];
|
|
14897
|
+
/**
|
|
14898
|
+
* Overrides config files rules
|
|
14899
|
+
*/
|
|
14900
|
+
overridesConfigFileRules?: TypedConfigItem['rules'];
|
|
14879
14901
|
/**
|
|
14880
14902
|
* More special case configs
|
|
14881
14903
|
*/
|
|
14882
14904
|
specialCaseConfigs?: TypedConfigItem[];
|
|
14883
14905
|
}
|
|
14884
|
-
interface
|
|
14906
|
+
interface ConfigTestOptions extends OptionsOverrides {
|
|
14885
14907
|
/**
|
|
14886
|
-
*
|
|
14887
|
-
*
|
|
14888
|
-
* @default 'prettier'
|
|
14908
|
+
* Overrides built-in vitest rules
|
|
14889
14909
|
*/
|
|
14890
|
-
|
|
14910
|
+
overridesVitestRules?: TypedConfigItem['rules'];
|
|
14911
|
+
}
|
|
14912
|
+
interface ConfigTypeScriptOptions extends OptionsExtensions, OptionsFiles, OptionsOverrides {
|
|
14891
14913
|
/**
|
|
14892
|
-
* Enable
|
|
14893
|
-
*
|
|
14894
|
-
* @default 'prettier'
|
|
14914
|
+
* Enable type aware check for TypeScript files
|
|
14895
14915
|
*/
|
|
14896
|
-
|
|
14916
|
+
tsconfigPath?: string;
|
|
14897
14917
|
/**
|
|
14898
|
-
*
|
|
14899
|
-
*
|
|
14900
|
-
* @default 'prettier'
|
|
14918
|
+
* Additional parser options
|
|
14901
14919
|
*/
|
|
14902
|
-
|
|
14920
|
+
parserOptions?: TSESLintParserOptions;
|
|
14903
14921
|
/**
|
|
14904
|
-
*
|
|
14922
|
+
* Glob patterns for files that should be type aware.
|
|
14923
|
+
* @default ['**\/*.{ts,tsx}']
|
|
14905
14924
|
*/
|
|
14906
|
-
|
|
14925
|
+
filesTypeAware?: string[];
|
|
14907
14926
|
/**
|
|
14908
|
-
*
|
|
14927
|
+
* Glob patterns for files that should not be type aware.
|
|
14928
|
+
* @default ['**\/*.md\/**', '**\/*.astro/*.ts']
|
|
14909
14929
|
*/
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14930
|
+
ignoresTypeAware?: string[];
|
|
14931
|
+
/**
|
|
14932
|
+
* Overrides built-in type aware rules
|
|
14933
|
+
*/
|
|
14934
|
+
overridesTypeAwareRules?: TypedConfigItem['rules'];
|
|
14913
14935
|
}
|
|
14914
|
-
interface
|
|
14936
|
+
interface ConfigUnoCSSOptions extends OptionsOverrides {
|
|
14915
14937
|
/**
|
|
14916
|
-
*
|
|
14938
|
+
* Enable attributify sort order
|
|
14939
|
+
*
|
|
14940
|
+
* @default false
|
|
14917
14941
|
*/
|
|
14918
|
-
|
|
14942
|
+
attributify?: boolean;
|
|
14943
|
+
}
|
|
14944
|
+
interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrides {
|
|
14919
14945
|
/**
|
|
14920
|
-
*
|
|
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
|
|
14921
14950
|
*/
|
|
14922
|
-
|
|
14951
|
+
sfcBlocks?: boolean | Options;
|
|
14923
14952
|
/**
|
|
14924
|
-
*
|
|
14953
|
+
* Vue version
|
|
14954
|
+
*
|
|
14955
|
+
* @default 3
|
|
14925
14956
|
*/
|
|
14926
|
-
|
|
14957
|
+
vueVersion?: 2 | 3;
|
|
14958
|
+
}
|
|
14959
|
+
interface OptionsOverrides<Rules extends TypedConfigItem['rules'] = TypedConfigItem['rules']> {
|
|
14960
|
+
overrides?: Rules;
|
|
14927
14961
|
}
|
|
14928
14962
|
/**
|
|
14929
14963
|
* Config factory options
|
|
@@ -14955,11 +14989,25 @@ interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions {
|
|
|
14955
14989
|
antfu?: boolean | ConfigAntfuOptions;
|
|
14956
14990
|
githubAction?: boolean | ConfigGitHubActionOptions;
|
|
14957
14991
|
}
|
|
14992
|
+
interface ConfigOptionsInternal {
|
|
14993
|
+
/**
|
|
14994
|
+
* @internal
|
|
14995
|
+
*/
|
|
14996
|
+
format?: boolean | ConfigFormatOptions;
|
|
14997
|
+
/**
|
|
14998
|
+
* @internal
|
|
14999
|
+
*/
|
|
15000
|
+
ntnyq?: boolean | ConfigNtnyqOptions;
|
|
15001
|
+
/**
|
|
15002
|
+
* @internal
|
|
15003
|
+
*/
|
|
15004
|
+
unusedImports?: boolean | ConfigUnusedImportsOptions;
|
|
15005
|
+
}
|
|
14958
15006
|
|
|
14959
15007
|
/**
|
|
14960
15008
|
* Prettier options
|
|
14961
15009
|
*/
|
|
14962
|
-
type PrettierOptions = Partial<Pick<RequiredOptions, '
|
|
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'>> & {
|
|
14963
15011
|
parser?: BuiltInParserName;
|
|
14964
15012
|
};
|
|
14965
15013
|
|
|
@@ -14982,6 +15030,7 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
|
14982
15030
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
14983
15031
|
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
14984
15032
|
declare const GLOB_DTS = "**/*.d.?([cm])ts";
|
|
15033
|
+
declare const GLOB_TYPES: string[];
|
|
14985
15034
|
declare const GLOB_TEST: string[];
|
|
14986
15035
|
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
14987
15036
|
declare const GLOB_CSS = "**/*.css";
|
|
@@ -15114,6 +15163,9 @@ declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem
|
|
|
15114
15163
|
|
|
15115
15164
|
declare const githubAction: (options?: ConfigGitHubActionOptions) => TypedConfigItem[];
|
|
15116
15165
|
|
|
15166
|
+
/**
|
|
15167
|
+
* Prefer `alphabetical` sort type
|
|
15168
|
+
*/
|
|
15117
15169
|
declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConfigItem[];
|
|
15118
15170
|
|
|
15119
15171
|
declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
|
|
@@ -15123,4 +15175,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
|
|
|
15123
15175
|
*/
|
|
15124
15176
|
declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
|
|
15125
15177
|
|
|
15126
|
-
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_VUE, GLOB_YAML, type InteropModuleDefault, type
|
|
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 };
|