import type { AddonLintSummary } from './build-summary.js'; import type { BuildToolchain } from './build-toolchain.js'; import { type ChunkProvenance } from './chunk-dependency-provenance.js'; export declare const ADDON_LINT_DEFAULT = true; export declare const ADDON_LINT_TIMEOUT_MS = 60000; export declare const ADDON_LINT_MAX_PRINTED = 20; export declare const ADDON_LINT_PACKAGE = "addons-linter"; interface AddonLintFinding { code?: string; message?: string; description?: string; file?: string; line?: number; column?: number; } export interface AddonLintOutput { errors?: AddonLintFinding[]; warnings?: AddonLintFinding[]; notices?: AddonLintFinding[]; } type AddonLintLevel = 'error' | 'warning'; export interface AddonLintLine { level: AddonLintLevel; code: string; message: string; location: string; } type AddonLintResult = { status: 'skipped'; reason: 'disabled' | 'mode' | 'browser'; } | { status: 'missing'; hint: string | null; } | { status: 'failed'; reason: string; line: string; debugLine: string; } | { status: 'linted'; findings: number; lines: string[]; reviewerNote: { path: string; line: string; } | null; }; type LinterModule = { createInstance: (options: { config: Record; runAsBinary: boolean; }) => { run: (deps?: Record) => Promise; }; }; export type LoadAddonLinter = (projectPath: string) => Promise; export interface RunAddonLintInput { projectPath: string; distPath: string; distDisplay: string; browser: string; mode: 'development' | 'production' | 'none'; enabled?: boolean; loadLinter?: LoadAddonLinter; timeoutMs?: number; chunkProvenance?: () => Map; toolchain?: BuildToolchain; } export declare function shouldRunAddonLint(input: { browser: string; mode: RunAddonLintInput['mode']; enabled?: boolean; }): Extract | null; export declare function buildNamesOversizeFiles(result: AddonLintResult, input: { browser: string; mode: RunAddonLintInput['mode']; }): boolean; export declare function collectAddonLintLines(output: AddonLintOutput | null | undefined): AddonLintLine[]; export declare const ADDON_LINT_PARSE_LIMIT_MB = 5; export declare function oversizeSingleFileLines(distPath: string): string[]; export declare function attributionFor(location: string, chunkProvenance?: Map, code?: string, browser?: string): string; export declare function formatAddonLintFindings(output: AddonLintOutput | null | undefined, distDisplay: string, maxPrinted?: number, chunkProvenance?: Map, browser?: string): { findings: number; lines: string[]; }; export declare function runAddonLint(input: RunAddonLintInput): Promise; export declare function failedAddonLint(error: unknown, distDisplay: string, distPath?: string): Extract; export declare function summarizeAddonLint(result: AddonLintResult): AddonLintSummary; export {};