import { Linter } from 'eslint'; import { Awaitable } from 'eslint-flat-config-utils'; declare function isInEditor(): boolean; declare function isInGitHooksOrLintStaged(): boolean; declare function hasVue(): boolean; /** @deprecated drop support for vue2 */ declare function isVue3(): boolean; declare const GLOB_JS = "**/*.?([cm])js"; declare const GLOB_JSX = "**/*.?([cm])jsx"; declare const GLOB_TS = "**/*.?([cm])ts"; declare const GLOB_DTS = "**/*.d.?([cm])ts"; declare const GLOB_TSX = "**/*.?([cm])tsx"; declare const GLOB_VUE = "**/*.vue"; declare const GLOB_JSON = "**/*.json"; declare const GLOB_JSON5 = "**/*.json5"; declare const GLOB_JSONC = "**/*.jsonc"; declare const GLOB_YAML = "**/*.y?(a)ml"; declare const GLOB_TOML = "**/*.toml"; declare const GLOB_HTML = "**/*.htm?(l)"; declare const GLOB_ASTRO = "**/*.astro"; declare const GLOB_ASTRO_TS = "**/*.astro/*.ts"; declare const GLOB_GRAPHQL = "**/*.{g,graph}ql"; declare const GLOB_MARKDOWN = "**/*.md"; declare const GLOB_NEST_MARKDOWN = "**/*.md/*.md"; declare const GLOB_SVELTE = "**/*.svelte"; declare const GLOB_STYLE = "**/*.{c,le,sc}ss"; declare const GLOB_CSS = "**/*.css"; declare const GLOB_POSTCSS = "**/*.{p,post}css"; declare const GLOB_LESS = "**/*.less"; declare const GLOB_SCSS = "**/*.scss"; declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)"; declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)"; declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)"; declare const GLOB_TESTS: string[]; declare const GLOB_EXCLUDE: string[]; type EslintFlatConfigItem = { plugins?: Record; } & Omit, "plugins">; type EslintFlatConfigs = Array>; /** * there has no default value for each properties, all properties are optional and be set by defineConfig */ type Options = { /** * enable eslint for css */ css?: boolean; /** * enable git ignore intergration */ gitignore?: boolean; /** * enable lint for graphql */ graphql?: boolean; /** * enable lint for json */ json?: boolean; /** * enable lint for jsx */ jsx?: boolean; /** * enable lint for markdown */ markdown?: boolean; /** * enable stylistic rules */ style?: boolean | StyleOptions; /** * enable lint for toml */ toml?: boolean; /** * enable lint for typescript */ typescript?: boolean | TypescriptOptions; /** * enable lint for unocss */ unocss?: boolean; /** * enable eslint for vue */ vue?: boolean; /** * enable lint for yaml */ yaml?: boolean; }; type Alterable = { [K in keyof T as T[K] extends boolean | undefined ? never : K]: T[K]; }; type AltOptionValue = T extends boolean ? never : T extends undefined ? Record : T; type TypescriptOptions = { tsconfigPath?: string; typeAware?: boolean; }; type StyleOptions = { semi?: boolean; singleQuote?: boolean; tabWidth?: number; trailingComma?: "all" | "none"; useTabs?: boolean; }; declare const DEFAULT_STYLE_OPTION: Required; declare function interopDefault(m: Awaitable): Promise; declare function renameRules(rules?: Partial, map?: Record): Partial; /** * Resolves the value of an option in the Options object. * * @param opts - The object containing the options. * @param key - The key of the option to resolve. * @param defaultValue - The default value to use if the option is not found. * @return The resolved value of the option. */ declare function resolveAltOption>(opts: Alterable, key: K, defaultValue?: AltOptionValue[K]>): AltOptionValue[K]>; /** * Extracts rules from the provided configurations based on the specified configName. * * @param configs - The array of configurations to extract rules from. * @param configName - The name of the configuration to filter rules by. * @return A Promise that resolves to a partial record of ESLint rules extracted from the configurations. */ declare function extractRules(configs: Array>, configName?: string): Promise; declare function findConfig(configs: EslintFlatConfigs, configName?: string): Promise; declare const parserPlain: Linter.Parser; export { type AltOptionValue, type Alterable, DEFAULT_STYLE_OPTION, type EslintFlatConfigItem, type EslintFlatConfigs, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_NEST_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type Options, type StyleOptions, type TypescriptOptions, extractRules, findConfig, hasVue, interopDefault, isInEditor, isInGitHooksOrLintStaged, isVue3, parserPlain, renameRules, resolveAltOption };