English
@mmd-toolkit/pie-no-empty-description-block
Disallow an accDescr block that holds no description.
✅ The recommended configuration enables this rule.
💡 This rule is manually fixable by editor suggestions.
mermaid.js accepts an empty accDescr {} block without an error. Written first, it changes nothing; after a description, it removes that description.
Rule Details
This rule applies to pie charts (pie). It reports an accDescr block holding nothing or only whitespace between its braces. A block holding only directives is also reported, although mermaid.js still applies their settings.
A block with a comment line inside its braces is not reported by this rule. After a description, that block still clears it and is reported by pie-no-duplicate-description. A comment outside the braces, as in accDescr {} %% later, does not prevent a report.
Examples of incorrect code for this rule:
mmd
%% eslint @mmd-toolkit/pie-no-empty-description-block: error
pie
accDescr {}
"A": 1Examples of correct code for this rule:
mmd
%% eslint @mmd-toolkit/pie-no-empty-description-block: error
pie
accDescr {
Revenue by product
in the last quarter
}
"A": 1Options
This rule has no options.
Related Rules
Version
This rule was introduced in @mmd-toolkit/eslint-plugin v0.1.0.