import type { DefaultExportSignature } from "./rules/AS-export-import-meta.js"; import { type SourceSpan } from "../parse/parser.js"; import type { Modules } from "./rules/module-registry.js"; export type Diagnostic = { code: string; severity: "error" | "info" | "warning"; message: string; filename: string; line: number; column: number; span: SourceSpan; fix?: Fix; hint?: string; }; export type Fix = { range: readonly [number, number]; replacement: string; }; export type LintOptions = { allowedExportNames?: readonly string[]; allowedGlobals?: readonly string[]; defaultExport?: DefaultExportSignature; fix?: boolean; filename?: string; largeLiteralThreshold?: number; frontmatterFields?: readonly string[]; modules?: Modules; }; export type LintFixResult = { diagnostics: Diagnostic[]; fixed: string; }; export declare function lint(source: string, options: LintOptions & { fix: true; }): LintFixResult; export declare function lint(source: string, options?: LintOptions): Diagnostic[];