English
@mmd-toolkit/venn-no-duplicate-title
Disallow a title that replaces a different title.
✅ The recommended configuration enables this rule.
💡 This rule is manually fixable by editor suggestions.
title sets the title of the whole diagram. mermaid.js accepts a later title without an error and displays only the later title, losing the earlier one.
Rule Details
This rule applies to Venn diagrams (venn-beta). It reports a title that changes the title set by the preceding title statement. Repeating the current title is not reported. Replacing a frontmatter title is not reported either.
The keyword is case-insensitive. A title includes the rest of the line after the first space or tab, including quotes and further spaces, so title "Audience" differs from title Audience. A title at the end of a line takes the next line as its title.
Titles are compared as written, so character references and HTML attribute quotes can differ for this rule although mermaid.js reads them alike.
Examples of incorrect code for this rule:
mmd
%% eslint @mmd-toolkit/venn-no-duplicate-title: error
venn-beta
title Audience
title Coverage
set AExamples of correct code for this rule:
mmd
%% eslint @mmd-toolkit/venn-no-duplicate-title: error
venn-beta
title Audience
set AOptions
This rule has no options.
Version
This rule was introduced in @mmd-toolkit/eslint-plugin v0.1.0.