@camunda/linting 1.2.0 → 1.3.0

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.
@@ -469,10 +469,6 @@ function getPropertyRequiredErrorMessage(report, executionPlatform, executionPla
469
469
  return `${ getIndefiniteArticle(typeString) } <${ typeString }> must have a defined <Timer type>`;
470
470
  }
471
471
 
472
- if (is(node, 'bpmn:TimerEventDefinition') && requiredProperty === 'timeDuration') {
473
- return `${ getIndefiniteArticle(typeString) } <${ typeString }> must have a defined <Timer duration>`;
474
- }
475
-
476
472
  if (is(node, 'bpmn:Process') && requiredProperty === 'historyTimeToLive') {
477
473
  return `${ getIndefiniteArticle(typeString) } <${ typeString }> must have a defined <History time to live>`;
478
474
  }
@@ -191,13 +191,13 @@ export function getEntryIds(report) {
191
191
  if (isExpressionRequiredError(data, 'timeCycle', 'bpmn:FormalExpression')
192
192
  || isExpressionRequiredError(data, 'timeDate', 'bpmn:FormalExpression')
193
193
  || isExpressionRequiredError(data, 'timeDuration', 'bpmn:FormalExpression')) {
194
- return hasOnlyDurationTimer(data.parentNode) ? [ 'timerEventDefinitionDurationValue' ] : [ 'timerEventDefinitionValue' ];
194
+ return [ 'timerEventDefinitionValue' ];
195
195
  }
196
196
 
197
197
  if (isExpressionValueNotAllowedError(data, 'timeCycle', 'bpmn:FormalExpression')
198
198
  || isExpressionValueNotAllowedError(data, 'timeDate', 'bpmn:FormalExpression')
199
199
  || isExpressionValueNotAllowedError(data, 'timeDuration', 'bpmn:FormalExpression')) {
200
- return hasOnlyDurationTimer(data.parentNode) ? [ 'timerEventDefinitionDurationValue' ] : [ 'timerEventDefinitionValue' ];
200
+ return [ 'timerEventDefinitionValue' ];
201
201
  }
202
202
 
203
203
  const LIST_PROPERTIES = [
@@ -370,11 +370,6 @@ export function getErrorMessage(id, report) {
370
370
  return 'Condition expression must be defined.';
371
371
  }
372
372
 
373
- if (id === 'timerEventDefinitionDurationValue') {
374
- return data.type === ERROR_TYPES.EXPRESSION_REQUIRED ?
375
- 'Duration must be defined.' : 'Must be an expression, or an ISO 8601 interval.';
376
- }
377
-
378
373
  if (id === 'timerEventDefinitionValue') {
379
374
  if (data.type === ERROR_TYPES.EXPRESSION_REQUIRED) {
380
375
  return 'Value must be defined.';
@@ -482,12 +477,4 @@ function isExpressionValueNotAllowedError(data, propertyName, type) {
482
477
 
483
478
  function getBusinessObject(element) {
484
479
  return element.businessObject || element;
485
- }
486
-
487
- function hasOnlyDurationTimer(node) {
488
- return is(node, 'bpmn:IntermediateCatchEvent') || isInterruptingBoundaryEvent(node);
489
- }
490
-
491
- function isInterruptingBoundaryEvent(event) {
492
- return is(event, 'bpmn:BoundaryEvent') && event.get('cancelActivity') !== false;
493
- }
480
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/linting",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Linting for Camunda Platform",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,10 +29,11 @@
29
29
  "dependencies": {
30
30
  "bpmn-moddle": "^8.0.0",
31
31
  "bpmnlint": "^8.0.0",
32
- "bpmnlint-plugin-camunda-compat": "^1.2.0",
32
+ "bpmnlint-plugin-camunda-compat": "^1.3.1",
33
33
  "bpmnlint-utils": "^1.0.2",
34
34
  "min-dash": "^4.0.0",
35
35
  "min-dom": "^4.1.0",
36
+ "modeler-moddle": "^0.2.0",
36
37
  "zeebe-bpmn-moddle": "^0.18.0"
37
38
  },
38
39
  "devDependencies": {
@@ -52,7 +53,6 @@
52
53
  "karma-webpack": "^5.0.0",
53
54
  "mocha": "^10.2.0",
54
55
  "mocha-test-container-support": "^0.2.0",
55
- "modeler-moddle": "^0.2.0",
56
56
  "puppeteer": "^19.5.2",
57
57
  "sinon": "^15.0.1",
58
58
  "sinon-chai": "^3.7.0",