Skip to content

MD098 - Disable comments should name explicit rules

Aliases: blanket-disable

This rule is off by default. Enable it in your project configuration:

[global]
extend-enable = ["MD098"]

What this rule does

Reports inline disable directives that suppress every rule rather than naming the rules they are intended to suppress. It applies to block, file, line and next-line disables, including their markdownlint equivalents.

Why this matters

A blanket disable hides unrelated diagnostics, including findings from rules added later. Explicit selectors keep the exception reviewable and narrow.

Examples

Incorrect

<!-- rumdl-disable -->
<!-- rumdl-disable-file -->
<!-- rumdl-disable-line -->
<!-- markdownlint-disable-next-line -->
Text.

Correct

<!-- rumdl-disable MD013 -->
<!-- rumdl-disable-file MD041 -->
<!-- rumdl-disable-line heading-increment -->
<!-- markdownlint-disable-next-line MD033 -->
Text.

Directive examples inside code spans and code blocks are ignored, as is prettier-ignore. Unknown rule names are handled by inline configuration validation. Wildcard selectors are reported because they suppress every rule.

This rule cannot be suppressed with an inline disable, including one naming MD098 explicitly. Disable it through project configuration or per-file ignores when a document needs a blanket exemption.

Configuration

This rule has no options.

Automatic fixes

No fix is offered because choosing which checks to suppress requires the author's intent.

  • MD087 checks whether explicit disable comments suppress any findings.