diff --git a/.commitlintrc.json b/.commitlintrc.json
deleted file mode 100644
index c30e5a970..000000000
--- a/.commitlintrc.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@commitlint/config-conventional"]
-}
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index ceff724bb..dceb314c8 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -14,7 +14,7 @@ module.exports = {
},
tsconfigRootDir: __dirname,
sourceType: 'module',
- ecmaVersion: 2020,
+ ecmaVersion: 2022,
allowAutomaticSingleRunInference: true,
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
parser: '@typescript-eslint/parser',
@@ -23,7 +23,7 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:json/recommended',
- 'plugin:markdown/recommended',
+ 'plugin:markdown/recommended-legacy',
'plugin:@cspell/recommended',
'prettier',
],
diff --git a/.husky/commit-msg b/.husky/commit-msg
deleted file mode 100755
index 59f6536e2..000000000
--- a/.husky/commit-msg
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-# . "$(dirname "$0")/_/husky.sh"
-
-# npx --no-install commitlint --edit $1
diff --git a/.prettierrc.json b/.prettierrc.json
index 4f0588f9c..28aa6e766 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -3,5 +3,6 @@
"printWidth": 100,
"singleQuote": true,
"useTabs": false,
- "tabWidth": 2
+ "tabWidth": 2,
+ "trailingComma": "es5"
}
diff --git a/cypress/integration/other/configuration.spec.js b/cypress/integration/other/configuration.spec.js
index 23338271f..9fd081567 100644
--- a/cypress/integration/other/configuration.spec.js
+++ b/cypress/integration/other/configuration.spec.js
@@ -125,4 +125,46 @@ describe('Configuration', () => {
);
});
});
+
+ describe('suppressErrorRendering', () => {
+ beforeEach(() => {
+ cy.on('uncaught:exception', (err, runnable) => {
+ return !err.message.includes('Parse error on line');
+ });
+ });
+
+ it('should not render error diagram if suppressErrorRendering is set', () => {
+ const url = 'http://localhost:9000/suppressError.html?suppressErrorRendering=true';
+ cy.visit(url);
+ cy.window().should('have.property', 'rendered', true);
+ cy.get('#test')
+ .find('svg')
+ .should(($svg) => {
+ // all failing diagrams should not appear!
+ expect($svg).to.have.length(2);
+ // none of the diagrams should be error diagrams
+ expect($svg).to.not.contain('Syntax error');
+ });
+ cy.matchImageSnapshot(
+ 'configuration.spec-should-not-render-error-diagram-if-suppressErrorRendering-is-set'
+ );
+ });
+
+ it('should render error diagram if suppressErrorRendering is not set', () => {
+ const url = 'http://localhost:9000/suppressError.html';
+ cy.visit(url);
+ cy.window().should('have.property', 'rendered', true);
+ cy.get('#test')
+ .find('svg')
+ .should(($svg) => {
+ // all five diagrams should be rendered
+ expect($svg).to.have.length(5);
+ // some of the diagrams should be error diagrams
+ expect($svg).to.contain('Syntax error');
+ });
+ cy.matchImageSnapshot(
+ 'configuration.spec-should-render-error-diagram-if-suppressErrorRendering-is-not-set'
+ );
+ });
+ });
});
diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js
index a81f18a2d..1285a0832 100644
--- a/cypress/integration/rendering/sequencediagram.spec.js
+++ b/cypress/integration/rendering/sequencediagram.spec.js
@@ -810,7 +810,10 @@ context('Sequence diagram', () => {
note left of Alice: config: mirrorActors=true
directive: mirrorActors=false
Bob->>Alice: Short as well
`,
- { logLevel: 0, sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' } }
+ {
+ logLevel: 0,
+ sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' },
+ }
);
});
});
@@ -861,7 +864,10 @@ context('Sequence diagram', () => {
a->>j: Hello John, how are you?
j-->>a: Great!
`,
- { logLevel: 0, sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' } }
+ {
+ logLevel: 0,
+ sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' },
+ }
);
});
it('should support actor links and properties when not mirrored EXPERIMENTAL: USE WITH CAUTION', () => {
diff --git a/cypress/platform/ashish2.html b/cypress/platform/ashish2.html
index 76fbd36f7..34091d33d 100644
--- a/cypress/platform/ashish2.html
+++ b/cypress/platform/ashish2.html
@@ -33,7 +33,9 @@
background-image: radial-gradient(#fff 1%, transparent 11%),
radial-gradient(#fff 1%, transparent 11%);
background-size: 20px 20px;
- background-position: 0 0, 10px 10px;
+ background-position:
+ 0 0,
+ 10px 10px;
background-repeat: repeat;
}
.malware {
diff --git a/cypress/platform/click_security_loose.html b/cypress/platform/click_security_loose.html
index 4cba4251d..a581eb403 100644
--- a/cypress/platform/click_security_loose.html
+++ b/cypress/platform/click_security_loose.html
@@ -1,4 +1,4 @@
-
+
+ flowchart + a[This should be visible] ++
+ flowchart + a --< b ++
+ flowchart + a[This should be visible] ++
+ --- + config: + suppressErrorRendering: true # This should not affect anything, as suppressErrorRendering is a secure config + --- + flowchart + a --< b ++
+ --- + config: + suppressErrorRendering: false # This should not affect anything, as suppressErrorRendering is a secure config + --- + flowchart + a --< b ++