import type ESLint from 'eslint'; type Falsy = boolean | null | undefined | 0 | 0n | ''; export interface LegacyConfig extends ESLint.Linter.Config { /** * Included file patterns for the resulting flat configurations. */ files?: string[]; /** * Ignored file patterns for the resulting flat configurations. */ ignores?: string[]; /** * Resolve plugins relative to this path. If this is a `file:` URL, it is * assumed to be `import.meta.url`, and will be converted to a simple * directory path. */ resolvePluginsRelativeTo?: string; } /** * Helper for building ESLint flat configurations. */ export declare class FlatConfigBuilder { #private; protected constructor(configs: ESLint.Linter.FlatConfig[]); /** * Use flat configurations. Can also be falsy or a factory function. */ readonly use: (config: ESLint.Linter.FlatConfig | ESLint.Linter.FlatConfig[] | Falsy | ((...args: TArgs) => ESLint.Linter.FlatConfig | ESLint.Linter.FlatConfig[]), ...args: TArgs) => FlatConfigBuilder; /** * Use a legacy (eslintrc) configuration. Can also be falsy. */ readonly useLegacy: (config: LegacyConfig | Falsy) => FlatConfigBuilder; /** * Add global ignore patterns to any previously defined global ignore * patterns. This is always additive. If you want to replace previous global * ignore patterns, call `use({ ignores: [...] })` instead. */ readonly ignore: (...patterns: string[]) => FlatConfigBuilder; readonly build: () => ESLint.Linter.FlatConfig[]; static create(): FlatConfigBuilder; } export declare const flatConfigBuilder: () => FlatConfigBuilder; export {};