@mermaid-lint/core
    Preparing search index...

    Interface SuppressionIndex

    Resolved suppression state for one block. Built once per blockToDiagnostics call and queried per finding.

    interface SuppressionIndex {
        directives: readonly Directive[];
        isSuppressed(ruleId: string, line: number | undefined): boolean;
        isUsed(directive: Directive): boolean;
        unused(): Directive[];
    }
    Index

    Properties

    directives: readonly Directive[]

    Every directive parsed for this block, body then document scope.

    Methods

    • Whether ruleId is suppressed at line.

      Querying marks the matching directive used, so unused() reflects what actually fired. Pass undefined for a finding with no line.

      Parameters

      • ruleId: string
      • line: number | undefined

      Returns boolean

    • Whether directive ever matched a query on this index.

      The per-directive form of what unused() answers in bulk, for the one case unused() can't serve: a file-scope directive is queried once per block index, so no single index knows whether it fired document-wide. Feed the answers to unusedFileDirectives.

      Parameters

      Returns boolean