From 6d2904cff16adff66bd1a995a7ff43a01b671dcc Mon Sep 17 00:00:00 2001 From: Vincent Lam Date: Tue, 24 Oct 2023 16:52:44 -0700 Subject: [PATCH] Added linting --- cypress/integration/rendering/flowchart-elk.spec.js | 8 +++----- .../src/diagrams/flowchart/elk/flowRenderer-elk.js | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cypress/integration/rendering/flowchart-elk.spec.js b/cypress/integration/rendering/flowchart-elk.spec.js index be60735d45..b18690441b 100644 --- a/cypress/integration/rendering/flowchart-elk.spec.js +++ b/cypress/integration/rendering/flowchart-elk.spec.js @@ -846,7 +846,6 @@ end }); describe('Title and arrow styling #4813', () => { - it('should render a flowchart with title', () => { const titleString = 'Test Title'; renderGraph( @@ -855,10 +854,9 @@ describe('Title and arrow styling #4813', () => { --- flowchart LR A-->B`, - { flowchart: { defaultRenderer: "elk" } } + { flowchart: { defaultRenderer: 'elk' } } ); cy.get('svg').should((svg) => { - const title = svg[0].querySelector('text'); expect(title.textContent).to.contain(titleString); }); @@ -873,7 +871,7 @@ describe('Title and arrow styling #4813', () => { B-.-oC C==xD D ~~~ A`, - { flowchart: { defaultRenderer: "elk" } } + { flowchart: { defaultRenderer: 'elk' } } ); cy.get('svg').should((svg) => { const edges = svg[0].querySelectorAll('.edges path'); @@ -883,4 +881,4 @@ describe('Title and arrow styling #4813', () => { expect(edges[3]).to.have.css('stroke-width', '1.5px'); }); }); -}) +}); diff --git a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js index c049786958..45eaadcb00 100644 --- a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js +++ b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js @@ -758,7 +758,7 @@ const insertEdge = function (edgesEl, edge, edgeData, diagObj, parentLookupDb, i .attr('class', 'path ' + edgeData.classes) .attr('fill', 'none'); Object.entries(edgeData).forEach(([key, value]) => { - if (key !== 'classes'){ + if (key !== 'classes') { edgePath.attr(key, value); } });