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

    Type Alias DirectiveProblem

    DirectiveProblem:
        | { kind: "missing-reason" }
        | { kind: "empty-rules" }
        | { kind: "empty-directive" }
        | { kind: "unmatched-enable" }
        | { kind: "syntax-rule-at-line-scope" }
        | { kind: "unknown-rule"; rule: string }
        | { expected: "body" | "file"; keyword: string; kind: "wrong-scope" }

    A problem detected while parsing a directive.

    Type Declaration

    • { kind: "missing-reason" }
    • { kind: "empty-rules" }
    • { kind: "empty-directive" }

      Both a reason and rule ids are absent (e.g. a bare %% mermaid-lint-disable). Reported as one diagnostic instead of both missing-reason and empty-rules — see parseDirective.

    • { kind: "unmatched-enable" }
    • { kind: "syntax-rule-at-line-scope" }
    • { kind: "unknown-rule"; rule: string }
    • { expected: "body" | "file"; keyword: string; kind: "wrong-scope" }

      The keyword only makes sense at the other scope: a -disable-file written as a %% diagram comment (expected: 'file'), or a line/range/ diagram-scope keyword written as an <!-- --> HTML comment (expected: 'body'). keyword is the full matched keyword, e.g. mermaid-lint-disable-file.