From d3e57269e35271e3a99485e7c1e6d8890d9fdb66 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 9 Dec 2024 11:59:17 +0100 Subject: [PATCH] fix(linting): account for actual dependency --- src/cloud-element-templates/linting/LinterPlugin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cloud-element-templates/linting/LinterPlugin.js b/src/cloud-element-templates/linting/LinterPlugin.js index 827eef08..3b99f991 100644 --- a/src/cloud-element-templates/linting/LinterPlugin.js +++ b/src/cloud-element-templates/linting/LinterPlugin.js @@ -10,6 +10,8 @@ import StaticResolver from 'bpmnlint/lib/resolver/static-resolver'; import ElementTemplates from '../ElementTemplates'; +import EventBus from 'diagram-js/lib/core/EventBus'; + import { getPropertyValue, validateProperty } from '../util/propertyUtil'; import { applyConditions } from '../Condition'; @@ -30,7 +32,9 @@ export const elementTemplateLintRule = ({ templates = [] }) => { // We use the ElementTemplates Module without the required bpmn-js modules // As we only use it to facilitate template ID and version lookup, // access to commandstack etc. is not required - const elementTemplates = new ElementTemplates(); + const eventBus = new EventBus(); + const elementTemplates = new ElementTemplates(null, null, eventBus, null, null); + elementTemplates.set(validTemplates); function check(node, reporter) {