The MD087 rule identifies 'dead' disable comments—comments that are present but no longer serve a purpose because the violation they were meant to suppress no longer exists.
Why use it?
Disable comments often persist after code is refactored. If a long URL is shortened, a rumdl-disable-line MD013 comment might remain. This silently keeps coverage turned off for a rule that is no longer needed. MD087 flags these to ensure your linting coverage remains accurate.
Examples
Incorrect (triggers MD087):
A short line. <!-- rumdl-disable-line MD013 -->
In this case, MD013 has nothing to report on this line, so the comment is useless.
Correct:
<!-- rumdl-disable-next-line MD013 -->
A line so long that it genuinely exceeds the configured limit, which is what the comment is for.
Partial Suppression:
If a comment names multiple rules, MD087 will report only the specific rules that suppressed nothing:
Text with <b>html</b>. <!-- rumdl-disable-line MD033 MD013 -->
If MD033 fires but MD013 does not, the error message will name MD013 alone.
What MD087 ignores
- Rules that are not part of the current run (e.g., disabled in config, excluded via
--disable, or in per-file-ignores). - Comments with no rule name (e.g.,
<!-- rumdl-disable -->). - Comments inside fenced or indented code blocks.
<!-- prettier-ignore --> comments.- Unknown rule names (e.g.,
MD999).