@camunda/linting 3.4.0 → 3.5.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.
@@ -7,14 +7,18 @@
7
7
  --cl-color-success: #52b415;
8
8
  }
9
9
 
10
+ .cl-icon, .cl-icon * {
11
+ box-sizing: border-box;
12
+ }
13
+
10
14
  .cl-icon {
11
15
  --icon-color: white;
12
16
  --icon-bg-color: #333;
13
17
  background: var(--icon-bg-color);
14
18
  color: var(--icon-color);
15
19
  border-radius: 100%;
16
- height: .75em;
17
- width: .75em;
20
+ height: 20px;
21
+ width: 20px;
18
22
  border: solid 4px var(--icon-bg-color);
19
23
  display: flex;
20
24
  align-items: center;
package/lib/Linter.js CHANGED
@@ -17,6 +17,8 @@ import { getEntryIds } from './utils/properties-panel';
17
17
 
18
18
  import { toSemverMinor } from './utils/version';
19
19
 
20
+ import { getDocumentationUrl } from './utils/documentation';
21
+
20
22
  const moddle = new BpmnModdle({
21
23
  modeler: modelerModdle,
22
24
  zeebe: zeebeModdle
@@ -83,6 +85,9 @@ export class Linter {
83
85
  propertiesPanel: {
84
86
  entryIds
85
87
  },
88
+ documentation: {
89
+ url: getDocumentationUrl(rule)
90
+ },
86
91
  rule
87
92
  };
88
93
  })
@@ -53,6 +53,7 @@ const rules = {
53
53
  "camunda-compat/no-zeebe-properties": "error",
54
54
  "camunda-compat/sequence-flow-condition": "error",
55
55
  "camunda-compat/signal-reference": "error",
56
+ "camunda-compat/start-form": "error",
56
57
  "camunda-compat/subscription": "error",
57
58
  "camunda-compat/task-schedule": "error",
58
59
  "camunda-compat/timer": "error",
@@ -168,18 +169,22 @@ import rule_23 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/signal-r
168
169
 
169
170
  cache['bpmnlint-plugin-camunda-compat/signal-reference'] = rule_23;
170
171
 
171
- import rule_24 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/subscription';
172
+ import rule_24 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/start-form';
172
173
 
173
- cache['bpmnlint-plugin-camunda-compat/subscription'] = rule_24;
174
+ cache['bpmnlint-plugin-camunda-compat/start-form'] = rule_24;
174
175
 
175
- import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/task-schedule';
176
+ import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/subscription';
176
177
 
177
- cache['bpmnlint-plugin-camunda-compat/task-schedule'] = rule_25;
178
+ cache['bpmnlint-plugin-camunda-compat/subscription'] = rule_25;
178
179
 
179
- import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/timer';
180
+ import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/task-schedule';
180
181
 
181
- cache['bpmnlint-plugin-camunda-compat/timer'] = rule_26;
182
+ cache['bpmnlint-plugin-camunda-compat/task-schedule'] = rule_26;
182
183
 
183
- import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-form';
184
+ import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/timer';
184
185
 
185
- cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_27;
186
+ cache['bpmnlint-plugin-camunda-compat/timer'] = rule_27;
187
+
188
+ import rule_28 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-form';
189
+
190
+ cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_28;
@@ -90,7 +90,7 @@ function getAnnotationPosition(element) {
90
90
  }
91
91
 
92
92
  return {
93
- bottom: 13,
93
+ bottom: 14,
94
94
  left: -6
95
95
  };
96
96
  }
@@ -0,0 +1,33 @@
1
+ const baseUrl = 'https://docs.camunda.io/docs/next/components/modeler/reference/modeling-guidance/rules';
2
+
3
+ export function getDocumentationUrl(rule) {
4
+ if (rule === 'camunda-compat/called-element') {
5
+ return getUrl('called-element');
6
+ }
7
+
8
+ if (rule === 'camunda-compat/element-type') {
9
+ return getUrl('element-type');
10
+ }
11
+
12
+ if (rule === 'camunda-compat/error-reference') {
13
+ return getUrl('error-reference');
14
+ }
15
+
16
+ if (rule === 'camunda-compat/escalation-reference') {
17
+ return getUrl('escalation-reference');
18
+ }
19
+
20
+ if (rule === 'camunda-compat/feel') {
21
+ return getUrl('feel');
22
+ }
23
+
24
+ if (rule === 'camunda-compat/message-reference') {
25
+ return getUrl('message-reference');
26
+ }
27
+
28
+ return null;
29
+ }
30
+
31
+ function getUrl(rule) {
32
+ return `${ baseUrl }/${ rule }`;
33
+ }
@@ -265,6 +265,10 @@ function getExtensionElementNotAllowedErrorMessage(report, executionPlatform, ex
265
265
  return getSupportedMessage('A <User Task> with <Due date> or <Follow up date>', executionPlatform, executionPlatformVersion, allowedVersion);
266
266
  }
267
267
 
268
+ if (is(node, 'bpmn:StartEvent') && is(extensionElement, 'zeebe:FormDefinition')) {
269
+ return getSupportedMessage('A <Start Event> with <User Task Form>', executionPlatform, executionPlatformVersion, allowedVersion);
270
+ }
271
+
268
272
  return message;
269
273
  }
270
274
 
@@ -181,6 +181,11 @@ export function getEntryIds(report) {
181
181
  });
182
182
  }
183
183
 
184
+ if (isExtensionElementNotAllowedError(data, 'zeebe:FormDefinition', 'bpmn:StartEvent')) {
185
+ return [ 'formType' ];
186
+ }
187
+
188
+
184
189
  if (isPropertyError(data, 'conditionExpression', 'bpmn:SequenceFlow')) {
185
190
  return [ 'conditionExpression' ];
186
191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/linting",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Linting for Camunda Platform",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,7 +32,7 @@
32
32
  "@bpmn-io/diagram-js-ui": "^0.2.2",
33
33
  "bpmn-moddle": "^8.0.0",
34
34
  "bpmnlint": "^9.2.0",
35
- "bpmnlint-plugin-camunda-compat": "^2.3.0",
35
+ "bpmnlint-plugin-camunda-compat": "^2.4.0",
36
36
  "bpmnlint-utils": "^1.0.2",
37
37
  "clsx": "^2.0.0",
38
38
  "min-dash": "^4.0.0",