bpmnlint-plugin-camunda-compat 2.3.0 → 2.4.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.
package/index.js CHANGED
@@ -18,6 +18,7 @@ const camundaCloud10Rules = withConfig({
18
18
  'no-template': 'error',
19
19
  'no-zeebe-properties': 'error',
20
20
  'sequence-flow-condition': 'error',
21
+ 'start-form': 'error',
21
22
  'subscription': 'error',
22
23
  'timer': 'error',
23
24
  'user-task-form': 'error',
@@ -51,7 +52,9 @@ const camundaCloud82Rules = withConfig({
51
52
  }, { version: '8.2' });
52
53
 
53
54
  const camundaCloud83Rules = withConfig({
54
- ...camundaCloud82Rules,
55
+ ...omit(camundaCloud82Rules, [
56
+ 'start-form'
57
+ ]),
55
58
  'signal-reference': 'error'
56
59
  }, { version: '8.3' });
57
60
 
@@ -92,6 +95,7 @@ const rules = {
92
95
  'no-zeebe-properties': './rules/camunda-cloud/no-zeebe-properties',
93
96
  'sequence-flow-condition': './rules/camunda-cloud/sequence-flow-condition',
94
97
  'signal-reference': './rules/camunda-cloud/signal-reference',
98
+ 'start-form': './rules/camunda-cloud/start-form',
95
99
  'subscription': './rules/camunda-cloud/subscription',
96
100
  'task-schedule': './rules/camunda-cloud/task-schedule',
97
101
  'timer': './rules/camunda-cloud/timer',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "A bpmnlint plug-in for Camunda Platform compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,29 @@
1
+ const { is } = require('bpmnlint-utils');
2
+
3
+ const { hasNoExtensionElement } = require('../utils/element');
4
+
5
+ const { reportErrors } = require('../utils/reporter');
6
+
7
+ const { skipInNonExecutableProcess } = require('../utils/rule');
8
+
9
+ const { greaterOrEqual } = require('../utils/version');
10
+
11
+ const startFormAllowedVersion = '8.3';
12
+
13
+ module.exports = skipInNonExecutableProcess(function({ version }) {
14
+ function check(node, reporter) {
15
+ if (!is(node, 'bpmn:StartEvent') || greaterOrEqual(version, startFormAllowedVersion)) {
16
+ return;
17
+ }
18
+
19
+ let errors = hasNoExtensionElement(node, 'zeebe:FormDefinition', node, startFormAllowedVersion);
20
+
21
+ if (errors.length) {
22
+ reportErrors(node, reporter, errors);
23
+ }
24
+ }
25
+
26
+ return {
27
+ check
28
+ };
29
+ });