import type { Simplify } from 'type-fest';
import { type ESLint, type Rule, type Linter } from 'eslint';
export type Space = boolean | number | string | undefined;
export type TypeScriptParserOptions = Linter.ParserOptions & {
    project?: string | string[] | boolean;
    projectService?: boolean;
    tsconfigRootDir?: string;
    programs?: unknown[];
};
export type XoConfigOptions = {
    /**
    Use spaces for indentation.

    Tabs are used if the value is `false`, otherwise the value is the number of spaces to use or true, the default number of spaces is 2.

    Global only. Use the [`@stylistic/indent`](https://eslint.style/rules/indent) and [`@html-eslint/indent`](https://html-eslint.org/docs/rules/indent) rules for file-specific indentation.
    */
    space?: Space;
    /**
    Use semicolons at the end of statements or error for semi-colon usage.

    Global only. Use the [`@stylistic/semi`](https://eslint.style/rules/semi) rule for file-specific semicolon rules.
    */
    semicolon?: boolean;
    /**
    Use Prettier to format code.

    Global only. Use the [`prettier/prettier`](https://github.com/prettier/eslint-plugin-prettier#options) rule for file-specific Prettier overrides.

    If `compat` is used, XO will not format with Prettier but will produce Prettier compatible code so Prettier can be used as a separate formatting tool.
    */
    prettier?: boolean | 'compat';
    /**
    Files to ignore, can be a glob or array of globs.
    */
    ignores?: string | string[];
};
export type LinterOptions = {
    /**
    The current working directory to use for relative paths.
    */
    cwd: string;
    /**
    Write fixes to the files.
    */
    fix?: boolean;
    /**
    The path to the file being linted.
    */
    filePath?: string;
    /**
    If true, show only errors and NOT warnings. false by default.
    */
    quiet?: boolean;
    /**
    Auto-configure type aware linting on unincluded TS files.

    Ensures that TypeScript files are linted with the type-aware parser even if they are not explicitly included in the tsconfig.

    */
    ts?: boolean;
    /**
    Custom path to config to use for the linter.
    */
    configPath?: string;
    /**
    Path to the ESLint suppressions file. Defaults to `eslint-suppressions.json` in the working directory.
    */
    suppressionsLocation?: string;
};
export type LintTextOptions = {
    /**
    The path to the file being linted.
    */
    filePath: string;
    /**
    Warn if the file is ignored.
    */
    warnIgnored?: boolean;
};
export type XoConfigItem = Simplify<XoConfigOptions & Omit<Linter.Config, 'files' | 'ignores'> & {
    /**
    An array of glob patterns indicating the files that the configuration object should apply to. If not specified, the configuration object applies to all JavaScript, TypeScript, and framework files. To configure other file types, such as HTML, Markdown, JSON, or CSS, set `files` explicitly.

    Accepts a single glob string, an array of globs, or ESLint's native format where nested arrays create AND patterns.

    @see [Ignore Patterns](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#excluding-files-with-ignores)
    */
    files?: string | Array<string | string[]> | undefined;
    /**
    An array of glob patterns indicating the files that the configuration object should not apply to. If not specified, the configuration object applies to all files matched by files.

    @see [Ignore Patterns](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#excluding-files-with-ignores)
    */
    ignores?: string | string[] | undefined;
}>;
export type FlatXoConfig = XoConfigItem | XoConfigItem[];
export type XoLintResult = {
    errorCount: number;
    warningCount: number;
    fixableErrorCount: number;
    fixableWarningCount: number;
    results: ESLint.LintResult[];
    rulesMeta: Record<string, Rule.RuleMetaData>;
};
