Skip to content

@mmd-toolkit/sequence-no-ignored-text ​

Disallow a line that mermaid.js reads as nothing.

✅ The recommended configuration enables this rule.

🔧 This rule is automatically fixable by the --fix CLI option.

Characters such as ) or / can stand where a statement starts without starting one. mermaid.js accepts and drops them without an error, so what the author wrote has no effect. This often happens when the end of a message is written on the next line.

Rule Details ​

This rule applies to sequence diagrams (sequenceDiagram). It reports each character that mermaid.js drops in this way, whether alone on a line, before a statement on the same line, or after a block's end on that line. The line ) ) gives two reports.

Examples of incorrect code for this rule:

mmd
%% eslint @mmd-toolkit/sequence-no-ignored-text: error
sequenceDiagram
  A ->> B: call(x
  
)
B -->> A: done

Examples of correct code for this rule:

mmd
%% eslint @mmd-toolkit/sequence-no-ignored-text: error
sequenceDiagram
  A ->> B: call(x)
  B -->> A: done

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.