Skip to content

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

Disallow a size that replaces the size set before it.

✅ The recommended configuration enables this rule.

💡 This rule is manually fixable by editor suggestions.

A map has one size. A later size replaces the size set before it without an error, and the earlier size is lost.

Rule Details ​

This rule applies to Wardley maps (wardley-beta). It reports a size giving a different width or height from the preceding size. Repeating the current size is not reported. Numbers are compared as numbers.

The rule does not read sizes in frontmatter or directive configuration.

Examples of incorrect code for this rule:

mmd
%% eslint @mmd-toolkit/wardley-no-duplicate-size: error
wardley-beta
  size [1100, 600]
  
size [800, 1000]

Examples of correct code for this rule:

mmd
%% eslint @mmd-toolkit/wardley-no-duplicate-size: error
wardley-beta
  size [800, 1000]

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.