Merge pull request #3845 from mermaid-js/sidv/eslintCleanup

Housekeeping with eslint-unicorn
This commit is contained in:
Knut Sveidqvist
2022-11-30 11:53:16 +01:00
committed by GitHub
60 changed files with 494 additions and 538 deletions

View File

@@ -326,7 +326,7 @@ describe('Gantt diagram', () => {
);
cy.get('svg').should((svg) => {
const el = svg.get(0);
const children = Array.from(el.children);
const children = [...el.children];
const titleEl = children.find(function (node) {
return node.tagName === 'title';

View File

@@ -96,7 +96,7 @@ describe('Requirement diagram', () => {
);
cy.get('svg').should((svg) => {
const el = svg.get(0);
const children = Array.from(el.children);
const children = [...el.children];
const titleEl = children.find(function (node) {
return node.tagName === 'title';

View File

@@ -54,7 +54,7 @@ function merge(current, update) {
if (
current.hasOwnProperty(key) &&
typeof current[key] === 'object' &&
!(current[key] instanceof Array)
!Array.isArray(current[key])
) {
merge(current[key], update[key]);