/** * Shared by the `suppression-policy` rule and the `cb-check-suppressions` CLI so both apply the * same parsing and verdicts. */ /** Rules whose suppressions hide unsafe code rather than a judgement call; fix the code instead. */ export declare const NEVER_SUPPRESS_RULES: readonly string[]; export declare const SUPPRESSION_POLICY_RULE_NAME = "suppression-policy"; /** Settings key through which `cb-check-suppressions` asks the rule to record violations to a file. */ export declare const RECORD_SETTING = "cb-check-suppressions"; type DirectiveKind = "lint" | "ts-expect-error" | "ts-ignore"; export interface Directive { kind: DirectiveKind; reason: string | undefined; /** Rule names as written, for `lint` directives; empty for a blanket disable. */ rules: readonly string[]; } export type ViolationId = "bannedReason" | "blanketDisable" | "forbiddenRule" | "missingReason" | "policyRule" | "tsIgnore"; export interface Violation { data: Record; messageId: ViolationId; } export declare const VIOLATION_MESSAGES: Record; /** Parses a comment's text (without its `//` or `/* *\/` delimiters). */ export declare function parseDirective(params: { comment: string; }): Directive | undefined; export declare function evaluateDirective(params: { directive: Directive; /** Lint leaves blanket disables to `unicorn/no-abusive-eslint-disable`, which they cannot silence. */ reportBlanket: boolean; }): Violation[]; export declare function formatViolation(params: { violation: Violation; }): string; export {};