import { type RecommendedConfigOptions } from '@xylabs/eslint-config-flat';
import type { Linter } from 'eslint';
export interface LintTierContext {
    configKind: 'custom' | 'preset';
    currentTier?: number;
    currentTierExport?: string;
    hasXylabsConfig: boolean;
    isReact: boolean;
    isTypeChecked: boolean;
    recommendedOptions?: Required<RecommendedConfigOptions>;
}
export interface LintTierDefinition {
    exportName: string;
    id: number;
    label: string;
}
export interface LintTierMessage {
    ruleId: string | null;
    severity: 1 | 2;
}
export interface LintTierCount {
    errors: number;
    label: string;
    tier: number;
    warnings: number;
}
type RuleSetting = Linter.RuleEntry<unknown[]> | undefined;
export declare const ANALYZE_LINT_TIER = 4;
export interface AnalyzeLintTierOptions {
    exportName: string;
    isReact: boolean;
    isTypeChecked: boolean;
    tier: number;
}
export declare function normalizeRuleLevel(setting: RuleSetting): 'error' | 'off' | 'warn';
export declare function countActualLintMessages(messages: readonly LintTierMessage[]): Pick<LintTierCount, 'errors' | 'warnings'>;
export declare function countMessagesForTier(messages: readonly LintTierMessage[], rules: Record<string, RuleSetting>): Pick<LintTierCount, 'errors' | 'warnings'>;
export declare function resolveLintTierConfigKind(source: string, currentTierExport: string | undefined): LintTierContext['configKind'];
export declare function getLintTierDefinitions(isReact: boolean, isTypeChecked: boolean): LintTierDefinition[];
export declare function detectLintTierContext(cwd: string): LintTierContext;
export declare function findClosestTierPreset(actual: Pick<LintTierCount, 'errors' | 'warnings'>, counts: readonly LintTierCount[]): number | undefined;
export declare function loadXylabsEslintConfigPackage(cwd: string, isReact: boolean): Promise<Record<string, unknown>>;
export declare function resolveTierConfigExport(configPackage: Record<string, unknown>, exportName: string): Linter.Config[];
export declare function mergeTierRules(mergeConfigRules: (configs: readonly Linter.Config[]) => Record<string, RuleSetting>, configs: readonly Linter.Config[]): Record<string, RuleSetting>;
export declare function loadMergeConfigRules(cwd: string): Promise<(configs: readonly Linter.Config[]) => Record<string, RuleSetting>>;
export declare function buildLintTierRuleMaps(cwd: string, context: Pick<LintTierContext, 'isReact' | 'isTypeChecked'>): Promise<Map<number, Record<string, RuleSetting>>>;
export declare function resolveMaxTierConfigExport(context: Pick<LintTierContext, 'isReact' | 'isTypeChecked'>): string;
export declare function buildAnalyzeLintTierOptions(context: Pick<LintTierContext, 'isReact' | 'isTypeChecked'>): AnalyzeLintTierOptions;
export declare function projectLintTierCounts(messages: readonly LintTierMessage[], tierRuleMaps: ReadonlyMap<number, Record<string, RuleSetting>>, definitions: readonly LintTierDefinition[]): LintTierCount[];
export declare function formatLintTierAnalysisReport({ actual, context, counts, eslintRunTier, files, timeMs, }: {
    actual: Pick<LintTierCount, 'errors' | 'warnings'>;
    context: LintTierContext;
    counts: readonly LintTierCount[];
    eslintRunTier?: number;
    files: number;
    timeMs: number;
}): string;
export {};
//# sourceMappingURL=lintTierAnalysis.d.ts.map