import type { RuleSeverity, RulesConfig } from "./core/types.js"; /** One `overrides` entry, as parsed: globs and the severities they set. */ export interface RuleOverride { readonly files: readonly string[]; readonly rules: { readonly [K in Id]?: RuleSeverity; }; } /** * The severity of every rule, for any path. Generic over the rule ids: the * root instantiates it over its rule set (a typo'd id is a tsc error there), * and generic code takes it over `string` and never spells an id. */ export interface RuleResolver { /** * The severity `rule` has for a finding at `path` (repository-relative). * `undefined` — a finding with no path — gets the severity from `rules`. */ severityAt(rule: Id, path: string | undefined): RuleSeverity; /** * Whether `rule` can fire anywhere: on in `rules`, or turned on by some * override. A check that would skip its whole scan when its rule is off asks * this, so an override that turns a rule ON for one folder is not dropped. */ mayFire(rule: Id): boolean; } /** Build the resolver once per run, from the parsed `rules` and `overrides`. */ export declare function ruleResolver(rules: Readonly>, overrides?: readonly RuleOverride[]): RuleResolver; //# sourceMappingURL=overrides.d.ts.map