@camunda/linting 3.36.1 → 3.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -486,6 +486,10 @@ function getPropertyRequiredErrorMessage(report, executionPlatform, executionPla
486
486
  requiredProperty
487
487
  } = data;
488
488
 
489
+ function isRequiredProperty(requiredPropertyToLookUp) {
490
+ return requiredProperty === requiredPropertyToLookUp || (isArray(requiredProperty) && requiredProperty.includes(requiredPropertyToLookUp));
491
+ }
492
+
489
493
  const typeString = getTypeString(parentNode || node);
490
494
 
491
495
  if (parentNode && is(parentNode, 'bpmn:BusinessRuleTask') && is(node, 'zeebe:CalledDecision') && requiredProperty === 'decisionId') {
@@ -576,14 +580,14 @@ function getPropertyRequiredErrorMessage(report, executionPlatform, executionPla
576
580
 
577
581
  // Camunda User Task
578
582
  if (is(node, 'zeebe:FormDefinition') && isZeebeUserTask(parentNode)) {
579
- if (isEmptyString(node.get('externalReference'))) {
583
+ if (isRequiredProperty('externalReference') && isEmptyString(node.get('externalReference'))) {
580
584
  return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: External reference> must have a defined <External reference>`;
581
- } else if (isEmptyString(node.get('formId'))) {
585
+ } else if (isRequiredProperty('formId') && isEmptyString(node.get('formId'))) {
582
586
  return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: Camunda Form> must have a defined <Form ID>`;
583
587
  }
584
588
  }
585
589
 
586
- if (is(node, 'zeebe:FormDefinition') && isArray(requiredProperty) && requiredProperty.includes('formId') && isEmptyString(node.get('formId'))) {
590
+ if (is(node, 'zeebe:FormDefinition') && isRequiredProperty('formId') && isEmptyString(node.get('formId'))) {
587
591
  return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: Camunda form (linked)> must have a defined <Form ID>`;
588
592
  }
589
593
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/linting",
3
- "version": "3.36.1",
3
+ "version": "3.37.1",
4
4
  "description": "Linting for Camunda",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@bpmn-io/diagram-js-ui": "^0.2.3",
33
33
  "bpmn-moddle": "^9.0.1",
34
- "bpmnlint": "^11.4.2",
35
- "bpmnlint-plugin-camunda-compat": "^2.34.2",
34
+ "bpmnlint": "^11.4.4",
35
+ "bpmnlint-plugin-camunda-compat": "^2.35.0",
36
36
  "bpmnlint-utils": "^1.0.2",
37
37
  "camunda-bpmn-moddle": "^7.0.1",
38
38
  "clsx": "^2.0.0",