@camunda/linting 3.24.0 → 3.26.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.
@@ -54,12 +54,15 @@ const rules = {
54
54
  "camunda-compat/no-expression": "error",
55
55
  "camunda-compat/no-loop": "error",
56
56
  "camunda-compat/no-multiple-none-start-events": "error",
57
+ "camunda-compat/no-priority-definition": "error",
57
58
  "camunda-compat/no-propagate-all-parent-variables": "error",
58
59
  "camunda-compat/no-signal-event-sub-process": "error",
59
60
  "camunda-compat/no-task-schedule": "error",
60
61
  "camunda-compat/no-template": "error",
62
+ "camunda-compat/no-version-tag": "error",
61
63
  "camunda-compat/no-zeebe-properties": "error",
62
64
  "camunda-compat/no-zeebe-user-task": "error",
65
+ "camunda-compat/priority-definition": "error",
63
66
  "camunda-compat/secrets": "warn",
64
67
  "camunda-compat/sequence-flow-condition": "error",
65
68
  "camunda-compat/signal-reference": "error",
@@ -185,66 +188,78 @@ import rule_24 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-multi
185
188
 
186
189
  cache['bpmnlint-plugin-camunda-compat/no-multiple-none-start-events'] = rule_24;
187
190
 
188
- import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-propagate-all-parent-variables';
191
+ import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-priority-definition';
189
192
 
190
- cache['bpmnlint-plugin-camunda-compat/no-propagate-all-parent-variables'] = rule_25;
193
+ cache['bpmnlint-plugin-camunda-compat/no-priority-definition'] = rule_25;
191
194
 
192
- import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-signal-event-sub-process';
195
+ import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-propagate-all-parent-variables';
193
196
 
194
- cache['bpmnlint-plugin-camunda-compat/no-signal-event-sub-process'] = rule_26;
197
+ cache['bpmnlint-plugin-camunda-compat/no-propagate-all-parent-variables'] = rule_26;
195
198
 
196
- import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-task-schedule';
199
+ import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-signal-event-sub-process';
197
200
 
198
- cache['bpmnlint-plugin-camunda-compat/no-task-schedule'] = rule_27;
201
+ cache['bpmnlint-plugin-camunda-compat/no-signal-event-sub-process'] = rule_27;
199
202
 
200
- import rule_28 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-template';
203
+ import rule_28 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-task-schedule';
201
204
 
202
- cache['bpmnlint-plugin-camunda-compat/no-template'] = rule_28;
205
+ cache['bpmnlint-plugin-camunda-compat/no-task-schedule'] = rule_28;
203
206
 
204
- import rule_29 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-zeebe-properties';
207
+ import rule_29 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-template';
205
208
 
206
- cache['bpmnlint-plugin-camunda-compat/no-zeebe-properties'] = rule_29;
209
+ cache['bpmnlint-plugin-camunda-compat/no-template'] = rule_29;
207
210
 
208
- import rule_30 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-zeebe-user-task';
211
+ import rule_30 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-version-tag';
209
212
 
210
- cache['bpmnlint-plugin-camunda-compat/no-zeebe-user-task'] = rule_30;
213
+ cache['bpmnlint-plugin-camunda-compat/no-version-tag'] = rule_30;
211
214
 
212
- import rule_31 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/secrets';
215
+ import rule_31 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-zeebe-properties';
213
216
 
214
- cache['bpmnlint-plugin-camunda-compat/secrets'] = rule_31;
217
+ cache['bpmnlint-plugin-camunda-compat/no-zeebe-properties'] = rule_31;
215
218
 
216
- import rule_32 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/sequence-flow-condition';
219
+ import rule_32 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-zeebe-user-task';
217
220
 
218
- cache['bpmnlint-plugin-camunda-compat/sequence-flow-condition'] = rule_32;
221
+ cache['bpmnlint-plugin-camunda-compat/no-zeebe-user-task'] = rule_32;
219
222
 
220
- import rule_33 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/signal-reference';
223
+ import rule_33 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/priority-definition';
221
224
 
222
- cache['bpmnlint-plugin-camunda-compat/signal-reference'] = rule_33;
225
+ cache['bpmnlint-plugin-camunda-compat/priority-definition'] = rule_33;
223
226
 
224
- import rule_34 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/start-event-form';
227
+ import rule_34 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/secrets';
225
228
 
226
- cache['bpmnlint-plugin-camunda-compat/start-event-form'] = rule_34;
229
+ cache['bpmnlint-plugin-camunda-compat/secrets'] = rule_34;
227
230
 
228
- import rule_35 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/subscription';
231
+ import rule_35 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/sequence-flow-condition';
229
232
 
230
- cache['bpmnlint-plugin-camunda-compat/subscription'] = rule_35;
233
+ cache['bpmnlint-plugin-camunda-compat/sequence-flow-condition'] = rule_35;
231
234
 
232
- import rule_36 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/task-schedule';
235
+ import rule_36 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/signal-reference';
233
236
 
234
- cache['bpmnlint-plugin-camunda-compat/task-schedule'] = rule_36;
237
+ cache['bpmnlint-plugin-camunda-compat/signal-reference'] = rule_36;
235
238
 
236
- import rule_37 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/timer';
239
+ import rule_37 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/start-event-form';
237
240
 
238
- cache['bpmnlint-plugin-camunda-compat/timer'] = rule_37;
241
+ cache['bpmnlint-plugin-camunda-compat/start-event-form'] = rule_37;
239
242
 
240
- import rule_38 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-definition';
243
+ import rule_38 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/subscription';
241
244
 
242
- cache['bpmnlint-plugin-camunda-compat/user-task-definition'] = rule_38;
245
+ cache['bpmnlint-plugin-camunda-compat/subscription'] = rule_38;
243
246
 
244
- import rule_39 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-form';
247
+ import rule_39 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/task-schedule';
245
248
 
246
- cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_39;
249
+ cache['bpmnlint-plugin-camunda-compat/task-schedule'] = rule_39;
247
250
 
248
- import rule_40 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/wait-for-completion';
251
+ import rule_40 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/timer';
249
252
 
250
- cache['bpmnlint-plugin-camunda-compat/wait-for-completion'] = rule_40;
253
+ cache['bpmnlint-plugin-camunda-compat/timer'] = rule_40;
254
+
255
+ import rule_41 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-definition';
256
+
257
+ cache['bpmnlint-plugin-camunda-compat/user-task-definition'] = rule_41;
258
+
259
+ import rule_42 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-form';
260
+
261
+ cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_42;
262
+
263
+ import rule_43 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/wait-for-completion';
264
+
265
+ cache['bpmnlint-plugin-camunda-compat/wait-for-completion'] = rule_43;
@@ -324,6 +324,10 @@ function getExtensionElementNotAllowedErrorMessage(report, executionPlatform, ex
324
324
  return getSupportedMessage('A <User Task> with <Due date> or <Follow up date>', executionPlatform, executionPlatformVersion, allowedVersion);
325
325
  }
326
326
 
327
+ if (is(node, 'bpmn:UserTask') && is(extensionElement, 'zeebe:PriorityDefinition')) {
328
+ return getSupportedMessage('A <User Task> with <Priority>', executionPlatform, executionPlatformVersion, allowedVersion);
329
+ }
330
+
327
331
  if (is(node, 'bpmn:StartEvent') && is(extensionElement, 'zeebe:FormDefinition')) {
328
332
  return getSupportedMessage('A <Start Event> with <User Task Form>', executionPlatform, executionPlatformVersion, allowedVersion);
329
333
  }
@@ -332,6 +336,10 @@ function getExtensionElementNotAllowedErrorMessage(report, executionPlatform, ex
332
336
  return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Execution listeners>`, executionPlatform, executionPlatformVersion, allowedVersion);
333
337
  }
334
338
 
339
+ if (is(node, 'bpmn:Process') && is(extensionElement, 'zeebe:VersionTag')) {
340
+ return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Version tag>`, executionPlatform, executionPlatformVersion, allowedVersion);
341
+ }
342
+
335
343
  return message;
336
344
  }
337
345
 
@@ -434,7 +442,7 @@ function getPropertyNotAllowedErrorMessage(report, executionPlatform, executionP
434
442
  }
435
443
 
436
444
  if (is(node, 'zeebe:AssignmentDefinition') && property === 'candidateUsers') {
437
- return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with defined <Candidate users>`, executionPlatform, executionPlatformVersion, allowedVersion);
445
+ return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Candidate users>`, executionPlatform, executionPlatformVersion, allowedVersion);
438
446
  }
439
447
 
440
448
  if (is(node, 'bpmn:SequenceFlow') && property === 'conditionExpression') {
@@ -449,6 +457,14 @@ function getPropertyNotAllowedErrorMessage(report, executionPlatform, executionP
449
457
  return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: Camunda form (linked)>`, executionPlatform, executionPlatformVersion, allowedVersion);
450
458
  }
451
459
 
460
+ if (isAny(node, [
461
+ 'zeebe:CalledDecision',
462
+ 'zeebe:CalledElement',
463
+ 'zeebe:FormDefinition'
464
+ ]) && property === 'versionTag') {
465
+ return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Version tag>`, executionPlatform, executionPlatformVersion, allowedVersion);
466
+ }
467
+
452
468
  return message;
453
469
  }
454
470
 
@@ -648,6 +664,10 @@ function getExpressionValueNotAllowedErrorMessage(report, executionPlatform, exe
648
664
  return `${ getIndefiniteArticle(typeString) } <${ typeString }> <Follow up date> must be an ISO 8601 date`;
649
665
  }
650
666
 
667
+ if (is(node, 'zeebe:PriorityDefinition') && property === 'priority') {
668
+ return `${ getIndefiniteArticle(typeString) } <${ typeString }> <Priority> must be an expression, or an integer between 0 and 100`;
669
+ }
670
+
651
671
  return message;
652
672
  }
653
673
 
@@ -715,7 +735,15 @@ function getPropertyValueNotAllowedErrorMessage(report, executionPlatform, execu
715
735
  'zeebe:CalledElement',
716
736
  'zeebe:FormDefinition'
717
737
  ]) && property === 'bindingType') {
718
- return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Binding: deployment>`, executionPlatform, executionPlatformVersion, allowedVersion);
738
+ const bindingType = node.get('bindingType');
739
+
740
+ let bindingTypeString = bindingType;
741
+
742
+ if (bindingType === 'versionTag') {
743
+ bindingTypeString = 'version tag';
744
+ }
745
+
746
+ return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Binding: ${ bindingTypeString }>`, executionPlatform, executionPlatformVersion, allowedVersion);
719
747
  }
720
748
 
721
749
  return message;
@@ -303,6 +303,14 @@ export function getEntryIds(report) {
303
303
  return ids;
304
304
  }
305
305
 
306
+ if (isExpressionValueNotAllowedError(data, 'priority', 'zeebe:PriorityDefinition')) {
307
+ return [ 'priorityDefinitionPriority' ];
308
+ }
309
+
310
+ if (isExtensionElementNotAllowedError(data, 'zeebe:PriorityDefinition', 'bpmn:UserTask')) {
311
+ return [ 'priorityDefinition' ];
312
+ }
313
+
306
314
  if (isPropertyError(data, 'propagateAllParentVariables', 'zeebe:CalledElement')) {
307
315
  return [ 'propagateAllParentVariables' ];
308
316
  }
@@ -336,6 +344,10 @@ export function getEntryIds(report) {
336
344
  return [ 'bindingType' ];
337
345
  }
338
346
 
347
+ if (isPropertyError(data, 'versionTag') || isExtensionElementNotAllowedError(data, 'zeebe:VersionTag')) {
348
+ return [ 'versionTag' ];
349
+ }
350
+
339
351
  return [];
340
352
  }
341
353
 
@@ -533,6 +545,14 @@ export function getErrorMessage(id, report) {
533
545
  }
534
546
  }
535
547
 
548
+ if (id === 'priorityDefinitionPriority') {
549
+ if (type === ERROR_TYPES.EXTENSION_ELEMENT_NOT_ALLOWED) {
550
+ return getNotSupportedMessage('', allowedVersion);
551
+ } else {
552
+ return 'Must be an expression, or an integer between 0 and 100.';
553
+ }
554
+ }
555
+
536
556
  if (id === 'propagateAllParentVariables') {
537
557
  return getNotSupportedMessage('', allowedVersion);
538
558
  }
@@ -560,6 +580,10 @@ export function getErrorMessage(id, report) {
560
580
  if (id === 'bindingType') {
561
581
  return getNotSupportedMessage('', allowedVersion);
562
582
  }
583
+
584
+ if (id === 'versionTag') {
585
+ return getNotSupportedMessage('', allowedVersion);
586
+ }
563
587
  }
564
588
 
565
589
  function isExtensionElementNotAllowedError(data, extensionElement, type) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/linting",
3
- "version": "3.24.0",
3
+ "version": "3.26.0",
4
4
  "description": "Linting for Camunda",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,7 +32,7 @@
32
32
  "@bpmn-io/diagram-js-ui": "^0.2.3",
33
33
  "bpmn-moddle": "^9.0.1",
34
34
  "bpmnlint": "^10.3.0",
35
- "bpmnlint-plugin-camunda-compat": "^2.23.0",
35
+ "bpmnlint-plugin-camunda-compat": "^2.25.0",
36
36
  "bpmnlint-utils": "^1.0.2",
37
37
  "camunda-bpmn-moddle": "^7.0.1",
38
38
  "clsx": "^2.0.0",
@@ -40,13 +40,13 @@
40
40
  "min-dom": "^5.1.1",
41
41
  "modeler-moddle": "^0.2.0",
42
42
  "semver-compare": "^1.0.0",
43
- "zeebe-bpmn-moddle": "^1.4.0"
43
+ "zeebe-bpmn-moddle": "^1.6.0"
44
44
  },
45
45
  "devDependencies": {
46
- "bpmn-js": "^17.9.0",
47
- "bpmn-js-element-templates": "^1.16.0",
48
- "bpmn-js-properties-panel": "^5.21.0",
49
- "camunda-bpmn-js-behaviors": "^1.5.0",
46
+ "bpmn-js": "^17.9.2",
47
+ "bpmn-js-element-templates": "^2.2.0",
48
+ "bpmn-js-properties-panel": "^5.23.0",
49
+ "camunda-bpmn-js-behaviors": "^1.6.1",
50
50
  "chai": "^4.4.1",
51
51
  "cross-env": "^7.0.3",
52
52
  "eslint": "^8.57.0",