@ntnyq/eslint-config 3.5.0 → 3.6.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.cjs +396 -118
- package/dist/index.d.cts +51 -23
- package/dist/index.d.ts +51 -23
- package/dist/index.js +396 -118
- package/package.json +10 -8
package/dist/index.d.cts
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';
|
|
@@ -9872,6 +9873,7 @@ type JsdocInformativeDocs = [] | [
|
|
|
9872
9873
|
];
|
|
9873
9874
|
type JsdocLinesBeforeBlock = [] | [
|
|
9874
9875
|
{
|
|
9876
|
+
checkBlockStarts?: boolean;
|
|
9875
9877
|
excludedTags?: string[];
|
|
9876
9878
|
ignoreSameLine?: boolean;
|
|
9877
9879
|
lines?: number;
|
|
@@ -12159,9 +12161,13 @@ type PerfectionistSortObjectTypes = [] | [
|
|
|
12159
12161
|
];
|
|
12160
12162
|
type PerfectionistSortObjects = [] | [
|
|
12161
12163
|
{
|
|
12164
|
+
destructuredObjects?: (boolean | {
|
|
12165
|
+
groups?: boolean;
|
|
12166
|
+
});
|
|
12162
12167
|
ignorePattern?: string[];
|
|
12163
12168
|
partitionByComment?: (string[] | boolean | string);
|
|
12164
12169
|
destructureOnly?: boolean;
|
|
12170
|
+
objectDeclarations?: boolean;
|
|
12165
12171
|
styledComponents?: boolean;
|
|
12166
12172
|
partitionByNewLine?: boolean;
|
|
12167
12173
|
specialCharacters?: ("remove" | "trim" | "keep");
|
|
@@ -14634,7 +14640,7 @@ type Yoda = [] | [("always" | "never")] | [
|
|
|
14634
14640
|
onlyEquality?: boolean;
|
|
14635
14641
|
}
|
|
14636
14642
|
];
|
|
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/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';
|
|
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';
|
|
14638
14644
|
|
|
14639
14645
|
/**
|
|
14640
14646
|
* Typed flat config item
|
|
@@ -14676,6 +14682,21 @@ type TSESLintParserOptions = Pretty<Required<Required<ConfigWithExtends>['langua
|
|
|
14676
14682
|
interface OptionsFiles {
|
|
14677
14683
|
files?: string[];
|
|
14678
14684
|
}
|
|
14685
|
+
/**
|
|
14686
|
+
* Options for add `extensions` support
|
|
14687
|
+
*/
|
|
14688
|
+
interface OptionsExtensions {
|
|
14689
|
+
extensions?: string[];
|
|
14690
|
+
}
|
|
14691
|
+
/**
|
|
14692
|
+
* Options for add `features` support
|
|
14693
|
+
*/
|
|
14694
|
+
type OptionsFeatures = {
|
|
14695
|
+
/**
|
|
14696
|
+
* Enable typescript support
|
|
14697
|
+
*/
|
|
14698
|
+
typescript?: boolean;
|
|
14699
|
+
};
|
|
14679
14700
|
/**
|
|
14680
14701
|
* Options for overrides `rules`
|
|
14681
14702
|
*/
|
|
@@ -14692,7 +14713,7 @@ type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
|
|
|
14692
14713
|
strict?: boolean;
|
|
14693
14714
|
};
|
|
14694
14715
|
type ConfigCommandOptions = ESLintPluginCommandOptions;
|
|
14695
|
-
interface ConfigJsdocOptions extends OptionsOverrides {
|
|
14716
|
+
interface ConfigJsdocOptions extends OptionsOverrides, OptionsFeatures {
|
|
14696
14717
|
}
|
|
14697
14718
|
interface ConfigUnoCSSOptions extends OptionsOverrides {
|
|
14698
14719
|
/**
|
|
@@ -14771,7 +14792,7 @@ interface ConfigJavaScriptOptions extends OptionsOverrides {
|
|
|
14771
14792
|
*/
|
|
14772
14793
|
strict?: boolean;
|
|
14773
14794
|
}
|
|
14774
|
-
interface ConfigTypeScriptOptions extends OptionsOverrides {
|
|
14795
|
+
interface ConfigTypeScriptOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
|
|
14775
14796
|
/**
|
|
14776
14797
|
* Enable type aware check for TypeScript files
|
|
14777
14798
|
*/
|
|
@@ -14817,11 +14838,11 @@ interface ConfigJsoncOptions extends OptionsOverrides {
|
|
|
14817
14838
|
}
|
|
14818
14839
|
interface ConfigYmlOptions extends OptionsOverrides {
|
|
14819
14840
|
}
|
|
14820
|
-
interface ConfigMarkdownOptions extends OptionsOverrides {
|
|
14841
|
+
interface ConfigMarkdownOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
|
|
14821
14842
|
}
|
|
14822
14843
|
interface ConfigTomlOptions extends OptionsOverrides {
|
|
14823
14844
|
}
|
|
14824
|
-
interface ConfigVueOptions extends OptionsOverrides {
|
|
14845
|
+
interface ConfigVueOptions extends OptionsOverrides, OptionsFiles, OptionsFeatures {
|
|
14825
14846
|
/**
|
|
14826
14847
|
* Create virtual files for Vue SFC blocks to enable linting.
|
|
14827
14848
|
*
|
|
@@ -14842,6 +14863,24 @@ interface ConfigTestOptions extends OptionsOverrides {
|
|
|
14842
14863
|
*/
|
|
14843
14864
|
overridesVitestRules?: TypedConfigItem['rules'];
|
|
14844
14865
|
}
|
|
14866
|
+
interface ConfigSpecialsOptions {
|
|
14867
|
+
/**
|
|
14868
|
+
* Overrides scripts rules
|
|
14869
|
+
*/
|
|
14870
|
+
overridesScriptsRules?: TypedConfigItem['rules'];
|
|
14871
|
+
/**
|
|
14872
|
+
* Overrides cli rules
|
|
14873
|
+
*/
|
|
14874
|
+
overridesCliRules?: TypedConfigItem['rules'];
|
|
14875
|
+
/**
|
|
14876
|
+
* Overrides user scripts rules
|
|
14877
|
+
*/
|
|
14878
|
+
overridesUserScriptsRules?: TypedConfigItem['rules'];
|
|
14879
|
+
/**
|
|
14880
|
+
* More special case configs
|
|
14881
|
+
*/
|
|
14882
|
+
specialCaseConfigs?: TypedConfigItem[];
|
|
14883
|
+
}
|
|
14845
14884
|
interface ConfigFormatOptions {
|
|
14846
14885
|
/**
|
|
14847
14886
|
* Enable formatter support for css, less, scss, sass and etc.
|
|
@@ -14889,7 +14928,7 @@ interface ConfigOptionsInternal {
|
|
|
14889
14928
|
/**
|
|
14890
14929
|
* Config factory options
|
|
14891
14930
|
*/
|
|
14892
|
-
interface ConfigOptions extends ConfigOptionsInternal {
|
|
14931
|
+
interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions {
|
|
14893
14932
|
node?: ConfigNodeOptions;
|
|
14894
14933
|
jsdoc?: ConfigJsdocOptions;
|
|
14895
14934
|
ignores?: ConfigIgnoresOptions;
|
|
@@ -14897,6 +14936,7 @@ interface ConfigOptions extends ConfigOptionsInternal {
|
|
|
14897
14936
|
command?: ConfigCommandOptions;
|
|
14898
14937
|
comments?: ConfigCommentsOptions;
|
|
14899
14938
|
javascript?: ConfigJavaScriptOptions;
|
|
14939
|
+
specials?: ConfigSpecialsOptions;
|
|
14900
14940
|
sort?: boolean | ConfigSortOptions;
|
|
14901
14941
|
gitignore?: boolean | ConfigGitIgnoreOptions;
|
|
14902
14942
|
stylistic?: boolean | ConfigStylisticOptions;
|
|
@@ -14930,7 +14970,7 @@ type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'tabWi
|
|
|
14930
14970
|
/**
|
|
14931
14971
|
* Config factory
|
|
14932
14972
|
*/
|
|
14933
|
-
declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]):
|
|
14973
|
+
declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]): FlatConfigComposer<TypedConfigItem, ConfigNames>;
|
|
14934
14974
|
|
|
14935
14975
|
/**
|
|
14936
14976
|
* @file globs constants
|
|
@@ -14999,24 +15039,12 @@ declare function resolveSubOptions<K extends keyof ConfigOptions>(options: Confi
|
|
|
14999
15039
|
|
|
15000
15040
|
declare function mergePrettierOptions(options?: PrettierOptions, overrides?: PrettierOptions): PrettierOptions;
|
|
15001
15041
|
|
|
15002
|
-
/**
|
|
15003
|
-
* @file ESLint parsers
|
|
15004
|
-
*/
|
|
15005
|
-
|
|
15006
15042
|
/**
|
|
15007
15043
|
* With meta
|
|
15008
15044
|
*/
|
|
15009
15045
|
declare const parserTypeScript: {
|
|
15010
|
-
meta?: {
|
|
15011
|
-
|
|
15012
|
-
version?: string | undefined;
|
|
15013
|
-
};
|
|
15014
|
-
parseForESLint(text: string, options?: unknown): {
|
|
15015
|
-
ast: unknown;
|
|
15016
|
-
scopeManager?: unknown;
|
|
15017
|
-
services?: unknown;
|
|
15018
|
-
visitorKeys?: unknown;
|
|
15019
|
-
};
|
|
15046
|
+
meta?: { [K in keyof _typescript_eslint_utils_ts_eslint.Parser.ParserMeta]?: _typescript_eslint_utils_ts_eslint.Parser.ParserMeta[K] | undefined; };
|
|
15047
|
+
parseForESLint(text: string, options?: unknown): { [k in keyof _typescript_eslint_utils_ts_eslint.Parser.ParseResult]: unknown; };
|
|
15020
15048
|
};
|
|
15021
15049
|
|
|
15022
15050
|
/**
|
|
@@ -15067,7 +15095,7 @@ declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
|
|
|
15067
15095
|
|
|
15068
15096
|
declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
|
|
15069
15097
|
|
|
15070
|
-
declare const specials: () => TypedConfigItem[];
|
|
15098
|
+
declare const specials: (options?: ConfigSpecialsOptions) => TypedConfigItem[];
|
|
15071
15099
|
|
|
15072
15100
|
declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
|
|
15073
15101
|
|
|
@@ -15095,4 +15123,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
|
|
|
15095
15123
|
*/
|
|
15096
15124
|
declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
|
|
15097
15125
|
|
|
15098
|
-
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 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 };
|
|
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 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 };
|
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';
|
|
@@ -9872,6 +9873,7 @@ type JsdocInformativeDocs = [] | [
|
|
|
9872
9873
|
];
|
|
9873
9874
|
type JsdocLinesBeforeBlock = [] | [
|
|
9874
9875
|
{
|
|
9876
|
+
checkBlockStarts?: boolean;
|
|
9875
9877
|
excludedTags?: string[];
|
|
9876
9878
|
ignoreSameLine?: boolean;
|
|
9877
9879
|
lines?: number;
|
|
@@ -12159,9 +12161,13 @@ type PerfectionistSortObjectTypes = [] | [
|
|
|
12159
12161
|
];
|
|
12160
12162
|
type PerfectionistSortObjects = [] | [
|
|
12161
12163
|
{
|
|
12164
|
+
destructuredObjects?: (boolean | {
|
|
12165
|
+
groups?: boolean;
|
|
12166
|
+
});
|
|
12162
12167
|
ignorePattern?: string[];
|
|
12163
12168
|
partitionByComment?: (string[] | boolean | string);
|
|
12164
12169
|
destructureOnly?: boolean;
|
|
12170
|
+
objectDeclarations?: boolean;
|
|
12165
12171
|
styledComponents?: boolean;
|
|
12166
12172
|
partitionByNewLine?: boolean;
|
|
12167
12173
|
specialCharacters?: ("remove" | "trim" | "keep");
|
|
@@ -14634,7 +14640,7 @@ type Yoda = [] | [("always" | "never")] | [
|
|
|
14634
14640
|
onlyEquality?: boolean;
|
|
14635
14641
|
}
|
|
14636
14642
|
];
|
|
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/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';
|
|
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';
|
|
14638
14644
|
|
|
14639
14645
|
/**
|
|
14640
14646
|
* Typed flat config item
|
|
@@ -14676,6 +14682,21 @@ type TSESLintParserOptions = Pretty<Required<Required<ConfigWithExtends>['langua
|
|
|
14676
14682
|
interface OptionsFiles {
|
|
14677
14683
|
files?: string[];
|
|
14678
14684
|
}
|
|
14685
|
+
/**
|
|
14686
|
+
* Options for add `extensions` support
|
|
14687
|
+
*/
|
|
14688
|
+
interface OptionsExtensions {
|
|
14689
|
+
extensions?: string[];
|
|
14690
|
+
}
|
|
14691
|
+
/**
|
|
14692
|
+
* Options for add `features` support
|
|
14693
|
+
*/
|
|
14694
|
+
type OptionsFeatures = {
|
|
14695
|
+
/**
|
|
14696
|
+
* Enable typescript support
|
|
14697
|
+
*/
|
|
14698
|
+
typescript?: boolean;
|
|
14699
|
+
};
|
|
14679
14700
|
/**
|
|
14680
14701
|
* Options for overrides `rules`
|
|
14681
14702
|
*/
|
|
@@ -14692,7 +14713,7 @@ type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
|
|
|
14692
14713
|
strict?: boolean;
|
|
14693
14714
|
};
|
|
14694
14715
|
type ConfigCommandOptions = ESLintPluginCommandOptions;
|
|
14695
|
-
interface ConfigJsdocOptions extends OptionsOverrides {
|
|
14716
|
+
interface ConfigJsdocOptions extends OptionsOverrides, OptionsFeatures {
|
|
14696
14717
|
}
|
|
14697
14718
|
interface ConfigUnoCSSOptions extends OptionsOverrides {
|
|
14698
14719
|
/**
|
|
@@ -14771,7 +14792,7 @@ interface ConfigJavaScriptOptions extends OptionsOverrides {
|
|
|
14771
14792
|
*/
|
|
14772
14793
|
strict?: boolean;
|
|
14773
14794
|
}
|
|
14774
|
-
interface ConfigTypeScriptOptions extends OptionsOverrides {
|
|
14795
|
+
interface ConfigTypeScriptOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
|
|
14775
14796
|
/**
|
|
14776
14797
|
* Enable type aware check for TypeScript files
|
|
14777
14798
|
*/
|
|
@@ -14817,11 +14838,11 @@ interface ConfigJsoncOptions extends OptionsOverrides {
|
|
|
14817
14838
|
}
|
|
14818
14839
|
interface ConfigYmlOptions extends OptionsOverrides {
|
|
14819
14840
|
}
|
|
14820
|
-
interface ConfigMarkdownOptions extends OptionsOverrides {
|
|
14841
|
+
interface ConfigMarkdownOptions extends OptionsOverrides, OptionsFiles, OptionsExtensions {
|
|
14821
14842
|
}
|
|
14822
14843
|
interface ConfigTomlOptions extends OptionsOverrides {
|
|
14823
14844
|
}
|
|
14824
|
-
interface ConfigVueOptions extends OptionsOverrides {
|
|
14845
|
+
interface ConfigVueOptions extends OptionsOverrides, OptionsFiles, OptionsFeatures {
|
|
14825
14846
|
/**
|
|
14826
14847
|
* Create virtual files for Vue SFC blocks to enable linting.
|
|
14827
14848
|
*
|
|
@@ -14842,6 +14863,24 @@ interface ConfigTestOptions extends OptionsOverrides {
|
|
|
14842
14863
|
*/
|
|
14843
14864
|
overridesVitestRules?: TypedConfigItem['rules'];
|
|
14844
14865
|
}
|
|
14866
|
+
interface ConfigSpecialsOptions {
|
|
14867
|
+
/**
|
|
14868
|
+
* Overrides scripts rules
|
|
14869
|
+
*/
|
|
14870
|
+
overridesScriptsRules?: TypedConfigItem['rules'];
|
|
14871
|
+
/**
|
|
14872
|
+
* Overrides cli rules
|
|
14873
|
+
*/
|
|
14874
|
+
overridesCliRules?: TypedConfigItem['rules'];
|
|
14875
|
+
/**
|
|
14876
|
+
* Overrides user scripts rules
|
|
14877
|
+
*/
|
|
14878
|
+
overridesUserScriptsRules?: TypedConfigItem['rules'];
|
|
14879
|
+
/**
|
|
14880
|
+
* More special case configs
|
|
14881
|
+
*/
|
|
14882
|
+
specialCaseConfigs?: TypedConfigItem[];
|
|
14883
|
+
}
|
|
14845
14884
|
interface ConfigFormatOptions {
|
|
14846
14885
|
/**
|
|
14847
14886
|
* Enable formatter support for css, less, scss, sass and etc.
|
|
@@ -14889,7 +14928,7 @@ interface ConfigOptionsInternal {
|
|
|
14889
14928
|
/**
|
|
14890
14929
|
* Config factory options
|
|
14891
14930
|
*/
|
|
14892
|
-
interface ConfigOptions extends ConfigOptionsInternal {
|
|
14931
|
+
interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions {
|
|
14893
14932
|
node?: ConfigNodeOptions;
|
|
14894
14933
|
jsdoc?: ConfigJsdocOptions;
|
|
14895
14934
|
ignores?: ConfigIgnoresOptions;
|
|
@@ -14897,6 +14936,7 @@ interface ConfigOptions extends ConfigOptionsInternal {
|
|
|
14897
14936
|
command?: ConfigCommandOptions;
|
|
14898
14937
|
comments?: ConfigCommentsOptions;
|
|
14899
14938
|
javascript?: ConfigJavaScriptOptions;
|
|
14939
|
+
specials?: ConfigSpecialsOptions;
|
|
14900
14940
|
sort?: boolean | ConfigSortOptions;
|
|
14901
14941
|
gitignore?: boolean | ConfigGitIgnoreOptions;
|
|
14902
14942
|
stylistic?: boolean | ConfigStylisticOptions;
|
|
@@ -14930,7 +14970,7 @@ type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'tabWi
|
|
|
14930
14970
|
/**
|
|
14931
14971
|
* Config factory
|
|
14932
14972
|
*/
|
|
14933
|
-
declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]):
|
|
14973
|
+
declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]): FlatConfigComposer<TypedConfigItem, ConfigNames>;
|
|
14934
14974
|
|
|
14935
14975
|
/**
|
|
14936
14976
|
* @file globs constants
|
|
@@ -14999,24 +15039,12 @@ declare function resolveSubOptions<K extends keyof ConfigOptions>(options: Confi
|
|
|
14999
15039
|
|
|
15000
15040
|
declare function mergePrettierOptions(options?: PrettierOptions, overrides?: PrettierOptions): PrettierOptions;
|
|
15001
15041
|
|
|
15002
|
-
/**
|
|
15003
|
-
* @file ESLint parsers
|
|
15004
|
-
*/
|
|
15005
|
-
|
|
15006
15042
|
/**
|
|
15007
15043
|
* With meta
|
|
15008
15044
|
*/
|
|
15009
15045
|
declare const parserTypeScript: {
|
|
15010
|
-
meta?: {
|
|
15011
|
-
|
|
15012
|
-
version?: string | undefined;
|
|
15013
|
-
};
|
|
15014
|
-
parseForESLint(text: string, options?: unknown): {
|
|
15015
|
-
ast: unknown;
|
|
15016
|
-
scopeManager?: unknown;
|
|
15017
|
-
services?: unknown;
|
|
15018
|
-
visitorKeys?: unknown;
|
|
15019
|
-
};
|
|
15046
|
+
meta?: { [K in keyof _typescript_eslint_utils_ts_eslint.Parser.ParserMeta]?: _typescript_eslint_utils_ts_eslint.Parser.ParserMeta[K] | undefined; };
|
|
15047
|
+
parseForESLint(text: string, options?: unknown): { [k in keyof _typescript_eslint_utils_ts_eslint.Parser.ParseResult]: unknown; };
|
|
15020
15048
|
};
|
|
15021
15049
|
|
|
15022
15050
|
/**
|
|
@@ -15067,7 +15095,7 @@ declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
|
|
|
15067
15095
|
|
|
15068
15096
|
declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
|
|
15069
15097
|
|
|
15070
|
-
declare const specials: () => TypedConfigItem[];
|
|
15098
|
+
declare const specials: (options?: ConfigSpecialsOptions) => TypedConfigItem[];
|
|
15071
15099
|
|
|
15072
15100
|
declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
|
|
15073
15101
|
|
|
@@ -15095,4 +15123,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
|
|
|
15095
15123
|
*/
|
|
15096
15124
|
declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
|
|
15097
15125
|
|
|
15098
|
-
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 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 };
|
|
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 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 };
|