From b7ca0664974f641cb6c721456712285d8d341b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 25 Aug 2023 15:17:39 +0200 Subject: [PATCH] fix lint --- dev/ts/component/ThemedBpmnVisualization.ts | 28 +++++++++---------- scripts/utils/parseBpmn.ts | 2 +- .../parser/json/converter/DiagramConverter.ts | 6 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dev/ts/component/ThemedBpmnVisualization.ts b/dev/ts/component/ThemedBpmnVisualization.ts index 680ba84f50..6f4bf7aed0 100644 --- a/dev/ts/component/ThemedBpmnVisualization.ts +++ b/dev/ts/component/ThemedBpmnVisualization.ts @@ -140,43 +140,43 @@ export class ThemedBpmnVisualization extends BpmnVisualization { break; } const style = styleSheet.styles[kind]; - style['fillColor'] = fillColor; - style['strokeColor'] = strokeColor; + style.fillColor = fillColor; + style.strokeColor = strokeColor; }); // TASK ShapeUtil.taskKinds().forEach(kind => { const style = styleSheet.styles[kind]; - style['fillColor'] = theme.taskAndCallActivityFillColor; + style.fillColor = theme.taskAndCallActivityFillColor; }); // CALL ACTIVITY const callActivityStyle = styleSheet.styles[ShapeBpmnElementKind.CALL_ACTIVITY]; - callActivityStyle['fillColor'] = theme.taskAndCallActivityFillColor; + callActivityStyle.fillColor = theme.taskAndCallActivityFillColor; // TEXT ANNOTATION const textAnnotationStyle = styleSheet.styles[ShapeBpmnElementKind.TEXT_ANNOTATION]; - textAnnotationStyle['fillColor'] = theme.textAnnotationFillColor ?? StyleDefault.TEXT_ANNOTATION_FILL_COLOR; + textAnnotationStyle.fillColor = theme.textAnnotationFillColor ?? StyleDefault.TEXT_ANNOTATION_FILL_COLOR; // POOL const poolStyle = styleSheet.styles[ShapeBpmnElementKind.POOL]; - poolStyle['fillColor'] = theme.poolFillColor; - poolStyle['swimlaneFillColor'] = theme.defaultFillColor; + poolStyle.fillColor = theme.poolFillColor; + poolStyle.swimlaneFillColor = theme.defaultFillColor; // LANE const laneStyle = styleSheet.styles[ShapeBpmnElementKind.LANE]; - laneStyle['fillColor'] = theme.laneFillColor; + laneStyle.fillColor = theme.laneFillColor; // DEFAULTS const defaultVertexStyle = styleSheet.getDefaultVertexStyle(); - defaultVertexStyle['fontColor'] = theme.defaultFontColor; - defaultVertexStyle['fillColor'] = theme.defaultFillColor; - defaultVertexStyle['strokeColor'] = theme.defaultStrokeColor; + defaultVertexStyle.fontColor = theme.defaultFontColor; + defaultVertexStyle.fillColor = theme.defaultFillColor; + defaultVertexStyle.strokeColor = theme.defaultStrokeColor; const defaultEdgeStyle = styleSheet.getDefaultEdgeStyle(); - defaultEdgeStyle['fontColor'] = theme.defaultFontColor; - defaultEdgeStyle['fillColor'] = theme.defaultFillColor; - defaultEdgeStyle['strokeColor'] = theme.flowColor ?? theme.defaultStrokeColor; + defaultEdgeStyle.fontColor = theme.defaultFontColor; + defaultEdgeStyle.fillColor = theme.defaultFillColor; + defaultEdgeStyle.strokeColor = theme.flowColor ?? theme.defaultStrokeColor; // theme configuration completed return true; diff --git a/scripts/utils/parseBpmn.ts b/scripts/utils/parseBpmn.ts index 72f3bca0a0..a9bf315086 100644 --- a/scripts/utils/parseBpmn.ts +++ b/scripts/utils/parseBpmn.ts @@ -27,7 +27,7 @@ import { readFileSync } from '../../test/shared/file-helper'; const __dirname = resolvePath(); const argv = parseArgs(process.argv.slice(2)); const bpmnFilePath = argv._[0]; -const outputType = argv['output'] || 'json'; +const outputType = argv.output || 'json'; // eslint-disable-next-line no-console console.info('Generating BPMN in the "%s" output type', outputType); diff --git a/src/component/parser/json/converter/DiagramConverter.ts b/src/component/parser/json/converter/DiagramConverter.ts index e365bda0d8..252deebffa 100644 --- a/src/component/parser/json/converter/DiagramConverter.ts +++ b/src/component/parser/json/converter/DiagramConverter.ts @@ -138,12 +138,12 @@ export default class DiagramConverter { if ('background-color' in bpmnShape) { shape.extensions.fillColor = bpmnShape['background-color'] as string; } else if ('fill' in bpmnShape) { - shape.extensions.fillColor = bpmnShape['fill'] as string; + shape.extensions.fillColor = bpmnShape.fill as string; } if ('border-color' in bpmnShape) { shape.extensions.strokeColor = bpmnShape['border-color'] as string; } else if ('stroke' in bpmnShape) { - shape.extensions.strokeColor = bpmnShape['stroke'] as string; + shape.extensions.strokeColor = bpmnShape.stroke as string; } } @@ -183,7 +183,7 @@ export default class DiagramConverter { if ('border-color' in bpmnEdge) { edge.extensions.strokeColor = bpmnEdge['border-color'] as string; } else if ('stroke' in bpmnEdge) { - edge.extensions.strokeColor = bpmnEdge['stroke'] as string; + edge.extensions.strokeColor = bpmnEdge.stroke as string; } }