import type { RuleOwner } from './rules/catalog.js'; export type DiagnosticSeverity = 'error' | 'warning'; export type DiagnosticLocation = { path: string; line: number; column: number; offset?: number; length?: number; }; export type LintDiagnostic = { id: string; severity: DiagnosticSeverity; message: string; help?: string; url?: string; owner: RuleOwner | 'generic'; location?: DiagnosticLocation; }; export type LintResult = { root: string; diagnostics: LintDiagnostic[]; files: number; durationMs: number; exitCode: 0 | 1; }; export type LinterToolErrorCode = 'LINTER_PREFLIGHT_FAILED' | 'LINTER_TOOL_FAILED' | 'OXLINT_CANCELLED' | 'OXLINT_FAILED' | 'OXLINT_INVALID_OUTPUT' | 'OXLINT_NOT_INSTALLED' | 'OXLINT_OUTPUT_LIMIT' | 'OXLINT_START_FAILED' | 'OXLINT_TIMEOUT'; type LinterToolErrorOptions = ErrorOptions & { code?: LinterToolErrorCode; }; export declare class LinterToolError extends Error { readonly exitCode = 2; readonly code: LinterToolErrorCode; constructor(message: string, options?: LinterToolErrorOptions); } export declare function compareDiagnostics(a: LintDiagnostic, b: LintDiagnostic): number; export declare function dedupeDiagnostics(diagnostics: readonly LintDiagnostic[]): LintDiagnostic[]; export {}; //# sourceMappingURL=diagnostic.d.ts.map