Skip to content

@mmd-toolkit/wardley-no-duplicate-pipeline ​

Disallow a pipeline that replaces the children of an earlier pipeline of the same parent.

✅ The recommended configuration enables this rule.

A parent has one pipeline. A later pipeline of the parent does not add its children to the earlier ones: mermaid.js replaces them without an error, and a child of the earlier pipeline is left out of the box of the pipeline, though it is still drawn as a node.

Rule Details ​

This rule applies to Wardley maps (wardley-beta). It reports a pipeline with different children from the preceding pipeline for the same parent. A pipeline with the same children, even in a different order, is not reported. A child given a different position in the later pipeline is reported instead by wardley-no-redefined-node.

Pipelines written before their parent is declared are compared too. Names are compared as wardley-no-undef compares them.

Examples of incorrect code for this rule:

mmd
%% eslint @mmd-toolkit/wardley-no-duplicate-pipeline: error
wardley-beta
  component Database [0.4, 0.8]
  pipeline Database {
    component "SQL" [0.5]
  }
  
pipeline Database {
component "Cloud" [0.9] }

Examples of correct code for this rule:

mmd
%% eslint @mmd-toolkit/wardley-no-duplicate-pipeline: error
wardley-beta
  component Database [0.4, 0.8]
  pipeline Database {
    component "SQL" [0.5]
    component "Cloud" [0.9]
  }

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.