Skip to content

@mmd-toolkit/architecture-no-reversed-marker ​

Disallow an arrowhead of an edge written pointing the other way.

✅ The recommended configuration enables this rule.

💡 This rule is manually fixable by editor suggestions.

An edge gets an arrowhead into its left end with < before the line, and into its right end with > after it. mermaid.js reads > before the line and < after it as the same arrowheads, without an error: the arrowhead is drawn pointing the other way than written.

Rule Details ​

This rule applies to architecture diagrams (architecture-beta). It reports an edge with > before its line or < after it, with or without a label. An edge with both is reported once.

< before the line and > after it are not reported. Neither is < or > in an edge label, where it is text.

Examples of incorrect code for this rule:

mmd
%% eslint @mmd-toolkit/architecture-no-reversed-marker: error
architecture-beta
  service api(server)[API]
  service db(database)[Database]
  api
:R >--< L:
db

Examples of correct code for this rule:

mmd
%% eslint @mmd-toolkit/architecture-no-reversed-marker: error
architecture-beta
  service api(server)[API]
  service db(database)[Database]
  api:R <--> L:db

Options ​

This rule has no options.

Further Reading ​

Version ​

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

Resources ​

Third-party tools for Mermaid diagram text.