import type { LintRule, LintDiagnostic, LintProjectConfig } from "./rule.js"; import type { IntrinsicDef } from "../lexicon.js"; /** * Result of a lint run, separating active diagnostics from suppressed ones. */ export interface LintRunResult { /** Diagnostics that were not suppressed by disable directives */ diagnostics: LintDiagnostic[]; /** Diagnostics that were suppressed by disable directives, with optional reason */ suppressed: Array; } /** * Represents a disable directive found in source code comments */ export interface DisableDirective { /** Line number where the directive appears (1-based) */ line: number; /** Type of directive */ type: "file" | "line" | "next-line"; /** Specific rule IDs to disable, or undefined for all rules */ ruleIds?: string[]; /** Optional reason for the suppression (text after ` -- `) */ reason?: string; } /** * Parse `chant-disable`/`chant-disable-line`/`chant-disable-next-line` * comments out of raw file content. Exported (in addition to being used * internally by `runLint`) so other diagnostic sources that are not plain * per-file AST `LintRule`s — e.g. ../lint/rules/comp's component composition * checks, which produce whole-component diagnostics rather than * exact-line ones — can still honor at least the file-level directive form * without duplicating this parsing. */ export declare function parseDisableComments(content: string): DisableDirective[]; /** * Execute lint rules on a set of files * @param files - Array of file paths to lint * @param rules - Array of lint rules to execute * @param ruleOptions - Optional map of rule ID to options object * @param intrinsics - chant #1106 — the active lexicons' registered * intrinsics (e.g. AWS's `Ref`, `GetAtt`), put on every file's * `LintContext.intrinsics` so a rule built on `../fold/subset.ts`'s * shared predicate (EVL001) answers exactly like `fold()` does for a * registered, opted-in call, instead of degrading to "every call is a * violation". Mirrors how `discover()` has threaded the same * `IntrinsicDef[]` into the fold path since #1039/#1105. Optional and * defaulting to none, so a caller that hasn't resolved a project's * lexicons (a unit test, `bench.test.ts`) is unaffected. * @param projectConfig - chant #1221 — the project's config slice for * config-aware rules (COR021 reads `environments` + `ownership`), put on * every file's `LintContext.projectConfig`. Optional; without it those * rules stay silent. * @returns LintRunResult with diagnostics and suppressed items */ export declare function runLint(files: string[], rules: LintRule[], ruleOptions?: Map>, intrinsics?: readonly IntrinsicDef[], projectConfig?: LintProjectConfig): Promise; //# sourceMappingURL=engine.d.ts.map