Skip to content

@mmd-toolkit/xychart-no-unclosed-description-block ​

Disallow a description block that is not closed by }.

✅ The recommended configuration enables this rule.

💡 This rule is manually fixable by editor suggestions.

When the closing } of an accDescr block is missing, mermaid.js accepts it without an error. The block takes all following statements as its text, and the description becomes empty whatever the block holds.

Rule Details ​

This rule applies to XY charts (xychart and xychart-beta). It reports an accDescr { block without a closing }, also accDescr { with nothing after it at the end of the text.

Examples of incorrect code for this rule:

mmd
%% eslint @mmd-toolkit/xychart-no-unclosed-description-block: error
xychart
  
accDescr {
Monthly sales
title Sales line [1, 2]

Examples of correct code for this rule:

mmd
%% eslint @mmd-toolkit/xychart-no-unclosed-description-block: error
xychart
  accDescr {
    Monthly sales
    by region
  }
  title "Sales"
  line [1, 2]

Options ​

This rule has no options.

Version ​

This rule was introduced in @mmd-toolkit/eslint-plugin v0.1.0.

Resources ​

Third-party tools for Mermaid diagram text.