English
@mmd-toolkit/sequence-no-create-destroy
Disallow create before destroy.
✅ The recommended configuration enables this rule.
create is written before participant or actor to create a participant at a message. Before destroy, mermaid.js accepts it without an error and creates the participant, but does not destroy it: create destroy A does what create participant A does.
Rule Details
This rule applies to sequence diagrams (sequenceDiagram). It reports a destroy statement preceded by create.
Examples of incorrect code for this rule:
mmd
%% eslint @mmd-toolkit/sequence-no-create-destroy: error
sequenceDiagram
create destroy A
B ->> A: xExamples of correct code for this rule:
mmd
%% eslint @mmd-toolkit/sequence-no-create-destroy: error
sequenceDiagram
create participant A
B ->> A: xOptions
This rule has no options.
Version
This rule was introduced in @mmd-toolkit/eslint-plugin v0.1.0.