@ntnyq/eslint-config 3.3.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -12
- package/dist/index.cjs +447 -362
- package/dist/index.d.cts +74 -18
- package/dist/index.d.ts +74 -18
- package/dist/index.js +439 -353
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -4,9 +4,9 @@ import { ESLintPluginCommandOptions } from 'eslint-plugin-command/types';
|
|
|
4
4
|
import { Options } from 'eslint-processor-vue-blocks';
|
|
5
5
|
export { default as processorVueBlocks } from 'eslint-processor-vue-blocks';
|
|
6
6
|
import { Linter } from 'eslint';
|
|
7
|
+
import { ConfigWithExtends } from 'typescript-eslint';
|
|
8
|
+
export { plugin as pluginTypeScript, configs as typescriptConfigs } from 'typescript-eslint';
|
|
7
9
|
import { RequiredOptions, BuiltInParserName } from 'prettier';
|
|
8
|
-
export { config as createTypeScriptConfig, plugin as pluginTypeScript, configs as typescriptConfigs } from 'typescript-eslint';
|
|
9
|
-
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
10
10
|
import * as eslintPluginRegexp from 'eslint-plugin-regexp';
|
|
11
11
|
export { eslintPluginRegexp as pluginRegexp };
|
|
12
12
|
export { default as pluginNode } from 'eslint-plugin-n';
|
|
@@ -42,8 +42,20 @@ export { jsoncEslintParser as parserJsonc };
|
|
|
42
42
|
/**
|
|
43
43
|
* @file Type Utils
|
|
44
44
|
*/
|
|
45
|
+
/**
|
|
46
|
+
* Array or not
|
|
47
|
+
*/
|
|
45
48
|
type Arrayable<T> = T | T[];
|
|
49
|
+
/**
|
|
50
|
+
* Promise or not
|
|
51
|
+
*/
|
|
46
52
|
type Awaitable<T> = T | Promise<T>;
|
|
53
|
+
/**
|
|
54
|
+
* Make types human readable
|
|
55
|
+
*/
|
|
56
|
+
type Pretty<T> = {
|
|
57
|
+
[P in keyof T]: T[P];
|
|
58
|
+
} & {};
|
|
47
59
|
/**
|
|
48
60
|
* A literal type that supports custom further strings but preserves autocompletion in IDEs.
|
|
49
61
|
*
|
|
@@ -14622,7 +14634,7 @@ type Yoda = [] | [("always" | "never")] | [
|
|
|
14622
14634
|
onlyEquality?: boolean;
|
|
14623
14635
|
}
|
|
14624
14636
|
];
|
|
14625
|
-
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/
|
|
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';
|
|
14626
14638
|
|
|
14627
14639
|
/**
|
|
14628
14640
|
* Typed flat config item
|
|
@@ -14633,14 +14645,26 @@ type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'pl
|
|
|
14633
14645
|
*/
|
|
14634
14646
|
plugins?: Record<string, any>;
|
|
14635
14647
|
};
|
|
14648
|
+
/**
|
|
14649
|
+
* ESLint config
|
|
14650
|
+
*/
|
|
14651
|
+
type ESLintConfig = Linter.Config;
|
|
14636
14652
|
/**
|
|
14637
14653
|
* ESLint parser
|
|
14638
14654
|
*/
|
|
14639
14655
|
type ESLintParser = Linter.Parser;
|
|
14640
14656
|
/**
|
|
14641
|
-
*
|
|
14657
|
+
* ESLint processor
|
|
14642
14658
|
*/
|
|
14643
|
-
type
|
|
14659
|
+
type ESLintProcessor = Linter.Processor;
|
|
14660
|
+
/**
|
|
14661
|
+
* ESLint parserOptions
|
|
14662
|
+
*/
|
|
14663
|
+
type ESLintParserOptions = Linter.ParserOptions;
|
|
14664
|
+
/**
|
|
14665
|
+
* TypeScript ESLint parserOptions
|
|
14666
|
+
*/
|
|
14667
|
+
type TSESLintParserOptions = Pretty<Required<Required<ConfigWithExtends>['languageOptions']>['parserOptions']>;
|
|
14644
14668
|
|
|
14645
14669
|
/**
|
|
14646
14670
|
* @file Config options
|
|
@@ -14671,6 +14695,12 @@ type ConfigCommandOptions = ESLintPluginCommandOptions;
|
|
|
14671
14695
|
interface ConfigJsdocOptions extends OptionsOverrides {
|
|
14672
14696
|
}
|
|
14673
14697
|
interface ConfigUnoCSSOptions extends OptionsOverrides {
|
|
14698
|
+
/**
|
|
14699
|
+
* Enable attributify sort order
|
|
14700
|
+
*
|
|
14701
|
+
* @default false
|
|
14702
|
+
*/
|
|
14703
|
+
attributify?: boolean;
|
|
14674
14704
|
}
|
|
14675
14705
|
interface ConfigUnicornOptions extends OptionsOverrides {
|
|
14676
14706
|
}
|
|
@@ -14749,7 +14779,21 @@ interface ConfigTypeScriptOptions extends OptionsOverrides {
|
|
|
14749
14779
|
/**
|
|
14750
14780
|
* Additional parser options
|
|
14751
14781
|
*/
|
|
14752
|
-
parserOptions?:
|
|
14782
|
+
parserOptions?: TSESLintParserOptions;
|
|
14783
|
+
/**
|
|
14784
|
+
* Glob patterns for files that should be type aware.
|
|
14785
|
+
* @default ['**\/*.{ts,tsx}']
|
|
14786
|
+
*/
|
|
14787
|
+
filesTypeAware?: string[];
|
|
14788
|
+
/**
|
|
14789
|
+
* Glob patterns for files that should not be type aware.
|
|
14790
|
+
* @default ['**\/*.md\/**', '**\/*.astro/*.ts']
|
|
14791
|
+
*/
|
|
14792
|
+
ignoresTypeAware?: string[];
|
|
14793
|
+
/**
|
|
14794
|
+
* Overrides built-in type aware rules
|
|
14795
|
+
*/
|
|
14796
|
+
overridesTypeAwareRules?: TypedConfigItem['rules'];
|
|
14753
14797
|
}
|
|
14754
14798
|
interface ConfigSortOptions {
|
|
14755
14799
|
/**
|
|
@@ -14794,7 +14838,7 @@ interface ConfigVueOptions extends OptionsOverrides {
|
|
|
14794
14838
|
}
|
|
14795
14839
|
interface ConfigTestOptions extends OptionsOverrides {
|
|
14796
14840
|
/**
|
|
14797
|
-
*
|
|
14841
|
+
* Overrides built-in vitest rules
|
|
14798
14842
|
*/
|
|
14799
14843
|
overridesVitestRules?: TypedConfigItem['rules'];
|
|
14800
14844
|
}
|
|
@@ -14846,20 +14890,20 @@ interface ConfigOptionsInternal {
|
|
|
14846
14890
|
* Config factory options
|
|
14847
14891
|
*/
|
|
14848
14892
|
interface ConfigOptions extends ConfigOptionsInternal {
|
|
14893
|
+
node?: ConfigNodeOptions;
|
|
14894
|
+
jsdoc?: ConfigJsdocOptions;
|
|
14849
14895
|
ignores?: ConfigIgnoresOptions;
|
|
14850
|
-
sort?: boolean | ConfigSortOptions;
|
|
14851
|
-
command?: boolean | ConfigCommandOptions;
|
|
14852
|
-
gitignore?: boolean | ConfigGitIgnoreOptions;
|
|
14853
14896
|
imports?: ConfigImportsOptions;
|
|
14854
|
-
|
|
14897
|
+
command?: ConfigCommandOptions;
|
|
14898
|
+
comments?: ConfigCommentsOptions;
|
|
14855
14899
|
javascript?: ConfigJavaScriptOptions;
|
|
14900
|
+
sort?: boolean | ConfigSortOptions;
|
|
14901
|
+
gitignore?: boolean | ConfigGitIgnoreOptions;
|
|
14856
14902
|
stylistic?: boolean | ConfigStylisticOptions;
|
|
14857
14903
|
typescript?: boolean | ConfigTypeScriptOptions;
|
|
14858
14904
|
unicorn?: boolean | ConfigUnicornOptions;
|
|
14859
14905
|
prettier?: boolean | ConfigPrettierOptions;
|
|
14860
14906
|
perfectionist?: boolean | ConfigPerfectionistOptions;
|
|
14861
|
-
comments?: boolean | ConfigCommentsOptions;
|
|
14862
|
-
jsdoc?: boolean | ConfigJsdocOptions;
|
|
14863
14907
|
unocss?: boolean | ConfigUnoCSSOptions;
|
|
14864
14908
|
regexp?: boolean | ConfigRegexpOptions;
|
|
14865
14909
|
jsonc?: boolean | ConfigJsoncOptions;
|
|
@@ -14886,7 +14930,7 @@ type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'tabWi
|
|
|
14886
14930
|
/**
|
|
14887
14931
|
* Config factory
|
|
14888
14932
|
*/
|
|
14889
|
-
declare function defineESLintConfig(options?: ConfigOptions, userConfigs
|
|
14933
|
+
declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]): Promise<FlatConfigComposer<TypedConfigItem, ConfigNames>>;
|
|
14890
14934
|
|
|
14891
14935
|
/**
|
|
14892
14936
|
* @file globs constants
|
|
@@ -14912,6 +14956,7 @@ declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
|
14912
14956
|
declare const GLOB_TOML = "**/*.toml";
|
|
14913
14957
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
14914
14958
|
declare const GLOB_ASTRO = "**/*.astro";
|
|
14959
|
+
declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
14915
14960
|
declare const GLOB_SVELTE = "**/*.svelte";
|
|
14916
14961
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
14917
14962
|
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
@@ -14954,12 +14999,24 @@ declare function resolveSubOptions<K extends keyof ConfigOptions>(options: Confi
|
|
|
14954
14999
|
|
|
14955
15000
|
declare function mergePrettierOptions(options?: PrettierOptions, overrides?: PrettierOptions): PrettierOptions;
|
|
14956
15001
|
|
|
15002
|
+
/**
|
|
15003
|
+
* @file ESLint parsers
|
|
15004
|
+
*/
|
|
15005
|
+
|
|
14957
15006
|
/**
|
|
14958
15007
|
* With meta
|
|
14959
15008
|
*/
|
|
14960
15009
|
declare const parserTypeScript: {
|
|
14961
|
-
meta?: {
|
|
14962
|
-
|
|
15010
|
+
meta?: {
|
|
15011
|
+
name?: string | undefined;
|
|
15012
|
+
version?: string | undefined;
|
|
15013
|
+
};
|
|
15014
|
+
parseForESLint(text: string, options?: unknown): {
|
|
15015
|
+
ast: unknown;
|
|
15016
|
+
scopeManager?: unknown;
|
|
15017
|
+
services?: unknown;
|
|
15018
|
+
visitorKeys?: unknown;
|
|
15019
|
+
};
|
|
14963
15020
|
};
|
|
14964
15021
|
|
|
14965
15022
|
/**
|
|
@@ -15025,7 +15082,6 @@ declare const gitignore: (options?: ConfigGitIgnoreOptions) => TypedConfigItem[]
|
|
|
15025
15082
|
declare const javascript: (options?: ConfigJavaScriptOptions) => TypedConfigItem[];
|
|
15026
15083
|
declare const jsx: () => TypedConfigItem[];
|
|
15027
15084
|
|
|
15028
|
-
declare const typescriptCore: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
15029
15085
|
declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
15030
15086
|
|
|
15031
15087
|
declare const githubAction: (options?: ConfigGitHubActionOptions) => TypedConfigItem[];
|
|
@@ -15039,4 +15095,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
|
|
|
15039
15095
|
*/
|
|
15040
15096
|
declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
|
|
15041
15097
|
|
|
15042
|
-
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 ESLintParser, GLOB_ALL_SRC, GLOB_ASTRO, 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
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { ESLintPluginCommandOptions } from 'eslint-plugin-command/types';
|
|
|
4
4
|
import { Options } from 'eslint-processor-vue-blocks';
|
|
5
5
|
export { default as processorVueBlocks } from 'eslint-processor-vue-blocks';
|
|
6
6
|
import { Linter } from 'eslint';
|
|
7
|
+
import { ConfigWithExtends } from 'typescript-eslint';
|
|
8
|
+
export { plugin as pluginTypeScript, configs as typescriptConfigs } from 'typescript-eslint';
|
|
7
9
|
import { RequiredOptions, BuiltInParserName } from 'prettier';
|
|
8
|
-
export { config as createTypeScriptConfig, plugin as pluginTypeScript, configs as typescriptConfigs } from 'typescript-eslint';
|
|
9
|
-
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
10
10
|
import * as eslintPluginRegexp from 'eslint-plugin-regexp';
|
|
11
11
|
export { eslintPluginRegexp as pluginRegexp };
|
|
12
12
|
export { default as pluginNode } from 'eslint-plugin-n';
|
|
@@ -42,8 +42,20 @@ export { jsoncEslintParser as parserJsonc };
|
|
|
42
42
|
/**
|
|
43
43
|
* @file Type Utils
|
|
44
44
|
*/
|
|
45
|
+
/**
|
|
46
|
+
* Array or not
|
|
47
|
+
*/
|
|
45
48
|
type Arrayable<T> = T | T[];
|
|
49
|
+
/**
|
|
50
|
+
* Promise or not
|
|
51
|
+
*/
|
|
46
52
|
type Awaitable<T> = T | Promise<T>;
|
|
53
|
+
/**
|
|
54
|
+
* Make types human readable
|
|
55
|
+
*/
|
|
56
|
+
type Pretty<T> = {
|
|
57
|
+
[P in keyof T]: T[P];
|
|
58
|
+
} & {};
|
|
47
59
|
/**
|
|
48
60
|
* A literal type that supports custom further strings but preserves autocompletion in IDEs.
|
|
49
61
|
*
|
|
@@ -14622,7 +14634,7 @@ type Yoda = [] | [("always" | "never")] | [
|
|
|
14622
14634
|
onlyEquality?: boolean;
|
|
14623
14635
|
}
|
|
14624
14636
|
];
|
|
14625
|
-
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/
|
|
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';
|
|
14626
14638
|
|
|
14627
14639
|
/**
|
|
14628
14640
|
* Typed flat config item
|
|
@@ -14633,14 +14645,26 @@ type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'pl
|
|
|
14633
14645
|
*/
|
|
14634
14646
|
plugins?: Record<string, any>;
|
|
14635
14647
|
};
|
|
14648
|
+
/**
|
|
14649
|
+
* ESLint config
|
|
14650
|
+
*/
|
|
14651
|
+
type ESLintConfig = Linter.Config;
|
|
14636
14652
|
/**
|
|
14637
14653
|
* ESLint parser
|
|
14638
14654
|
*/
|
|
14639
14655
|
type ESLintParser = Linter.Parser;
|
|
14640
14656
|
/**
|
|
14641
|
-
*
|
|
14657
|
+
* ESLint processor
|
|
14642
14658
|
*/
|
|
14643
|
-
type
|
|
14659
|
+
type ESLintProcessor = Linter.Processor;
|
|
14660
|
+
/**
|
|
14661
|
+
* ESLint parserOptions
|
|
14662
|
+
*/
|
|
14663
|
+
type ESLintParserOptions = Linter.ParserOptions;
|
|
14664
|
+
/**
|
|
14665
|
+
* TypeScript ESLint parserOptions
|
|
14666
|
+
*/
|
|
14667
|
+
type TSESLintParserOptions = Pretty<Required<Required<ConfigWithExtends>['languageOptions']>['parserOptions']>;
|
|
14644
14668
|
|
|
14645
14669
|
/**
|
|
14646
14670
|
* @file Config options
|
|
@@ -14671,6 +14695,12 @@ type ConfigCommandOptions = ESLintPluginCommandOptions;
|
|
|
14671
14695
|
interface ConfigJsdocOptions extends OptionsOverrides {
|
|
14672
14696
|
}
|
|
14673
14697
|
interface ConfigUnoCSSOptions extends OptionsOverrides {
|
|
14698
|
+
/**
|
|
14699
|
+
* Enable attributify sort order
|
|
14700
|
+
*
|
|
14701
|
+
* @default false
|
|
14702
|
+
*/
|
|
14703
|
+
attributify?: boolean;
|
|
14674
14704
|
}
|
|
14675
14705
|
interface ConfigUnicornOptions extends OptionsOverrides {
|
|
14676
14706
|
}
|
|
@@ -14749,7 +14779,21 @@ interface ConfigTypeScriptOptions extends OptionsOverrides {
|
|
|
14749
14779
|
/**
|
|
14750
14780
|
* Additional parser options
|
|
14751
14781
|
*/
|
|
14752
|
-
parserOptions?:
|
|
14782
|
+
parserOptions?: TSESLintParserOptions;
|
|
14783
|
+
/**
|
|
14784
|
+
* Glob patterns for files that should be type aware.
|
|
14785
|
+
* @default ['**\/*.{ts,tsx}']
|
|
14786
|
+
*/
|
|
14787
|
+
filesTypeAware?: string[];
|
|
14788
|
+
/**
|
|
14789
|
+
* Glob patterns for files that should not be type aware.
|
|
14790
|
+
* @default ['**\/*.md\/**', '**\/*.astro/*.ts']
|
|
14791
|
+
*/
|
|
14792
|
+
ignoresTypeAware?: string[];
|
|
14793
|
+
/**
|
|
14794
|
+
* Overrides built-in type aware rules
|
|
14795
|
+
*/
|
|
14796
|
+
overridesTypeAwareRules?: TypedConfigItem['rules'];
|
|
14753
14797
|
}
|
|
14754
14798
|
interface ConfigSortOptions {
|
|
14755
14799
|
/**
|
|
@@ -14794,7 +14838,7 @@ interface ConfigVueOptions extends OptionsOverrides {
|
|
|
14794
14838
|
}
|
|
14795
14839
|
interface ConfigTestOptions extends OptionsOverrides {
|
|
14796
14840
|
/**
|
|
14797
|
-
*
|
|
14841
|
+
* Overrides built-in vitest rules
|
|
14798
14842
|
*/
|
|
14799
14843
|
overridesVitestRules?: TypedConfigItem['rules'];
|
|
14800
14844
|
}
|
|
@@ -14846,20 +14890,20 @@ interface ConfigOptionsInternal {
|
|
|
14846
14890
|
* Config factory options
|
|
14847
14891
|
*/
|
|
14848
14892
|
interface ConfigOptions extends ConfigOptionsInternal {
|
|
14893
|
+
node?: ConfigNodeOptions;
|
|
14894
|
+
jsdoc?: ConfigJsdocOptions;
|
|
14849
14895
|
ignores?: ConfigIgnoresOptions;
|
|
14850
|
-
sort?: boolean | ConfigSortOptions;
|
|
14851
|
-
command?: boolean | ConfigCommandOptions;
|
|
14852
|
-
gitignore?: boolean | ConfigGitIgnoreOptions;
|
|
14853
14896
|
imports?: ConfigImportsOptions;
|
|
14854
|
-
|
|
14897
|
+
command?: ConfigCommandOptions;
|
|
14898
|
+
comments?: ConfigCommentsOptions;
|
|
14855
14899
|
javascript?: ConfigJavaScriptOptions;
|
|
14900
|
+
sort?: boolean | ConfigSortOptions;
|
|
14901
|
+
gitignore?: boolean | ConfigGitIgnoreOptions;
|
|
14856
14902
|
stylistic?: boolean | ConfigStylisticOptions;
|
|
14857
14903
|
typescript?: boolean | ConfigTypeScriptOptions;
|
|
14858
14904
|
unicorn?: boolean | ConfigUnicornOptions;
|
|
14859
14905
|
prettier?: boolean | ConfigPrettierOptions;
|
|
14860
14906
|
perfectionist?: boolean | ConfigPerfectionistOptions;
|
|
14861
|
-
comments?: boolean | ConfigCommentsOptions;
|
|
14862
|
-
jsdoc?: boolean | ConfigJsdocOptions;
|
|
14863
14907
|
unocss?: boolean | ConfigUnoCSSOptions;
|
|
14864
14908
|
regexp?: boolean | ConfigRegexpOptions;
|
|
14865
14909
|
jsonc?: boolean | ConfigJsoncOptions;
|
|
@@ -14886,7 +14930,7 @@ type PrettierOptions = Partial<Pick<RequiredOptions, 'semi' | 'useTabs' | 'tabWi
|
|
|
14886
14930
|
/**
|
|
14887
14931
|
* Config factory
|
|
14888
14932
|
*/
|
|
14889
|
-
declare function defineESLintConfig(options?: ConfigOptions, userConfigs
|
|
14933
|
+
declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]): Promise<FlatConfigComposer<TypedConfigItem, ConfigNames>>;
|
|
14890
14934
|
|
|
14891
14935
|
/**
|
|
14892
14936
|
* @file globs constants
|
|
@@ -14912,6 +14956,7 @@ declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
|
14912
14956
|
declare const GLOB_TOML = "**/*.toml";
|
|
14913
14957
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
14914
14958
|
declare const GLOB_ASTRO = "**/*.astro";
|
|
14959
|
+
declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
14915
14960
|
declare const GLOB_SVELTE = "**/*.svelte";
|
|
14916
14961
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
14917
14962
|
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
@@ -14954,12 +14999,24 @@ declare function resolveSubOptions<K extends keyof ConfigOptions>(options: Confi
|
|
|
14954
14999
|
|
|
14955
15000
|
declare function mergePrettierOptions(options?: PrettierOptions, overrides?: PrettierOptions): PrettierOptions;
|
|
14956
15001
|
|
|
15002
|
+
/**
|
|
15003
|
+
* @file ESLint parsers
|
|
15004
|
+
*/
|
|
15005
|
+
|
|
14957
15006
|
/**
|
|
14958
15007
|
* With meta
|
|
14959
15008
|
*/
|
|
14960
15009
|
declare const parserTypeScript: {
|
|
14961
|
-
meta?: {
|
|
14962
|
-
|
|
15010
|
+
meta?: {
|
|
15011
|
+
name?: string | undefined;
|
|
15012
|
+
version?: string | undefined;
|
|
15013
|
+
};
|
|
15014
|
+
parseForESLint(text: string, options?: unknown): {
|
|
15015
|
+
ast: unknown;
|
|
15016
|
+
scopeManager?: unknown;
|
|
15017
|
+
services?: unknown;
|
|
15018
|
+
visitorKeys?: unknown;
|
|
15019
|
+
};
|
|
14963
15020
|
};
|
|
14964
15021
|
|
|
14965
15022
|
/**
|
|
@@ -15025,7 +15082,6 @@ declare const gitignore: (options?: ConfigGitIgnoreOptions) => TypedConfigItem[]
|
|
|
15025
15082
|
declare const javascript: (options?: ConfigJavaScriptOptions) => TypedConfigItem[];
|
|
15026
15083
|
declare const jsx: () => TypedConfigItem[];
|
|
15027
15084
|
|
|
15028
|
-
declare const typescriptCore: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
15029
15085
|
declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
15030
15086
|
|
|
15031
15087
|
declare const githubAction: (options?: ConfigGitHubActionOptions) => TypedConfigItem[];
|
|
@@ -15039,4 +15095,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
|
|
|
15039
15095
|
*/
|
|
15040
15096
|
declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
|
|
15041
15097
|
|
|
15042
|
-
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 ESLintParser, GLOB_ALL_SRC, GLOB_ASTRO, 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
|
|
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 };
|