bpmnlint 11.4.2 → 11.4.4
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/README.md
CHANGED
|
@@ -35,7 +35,7 @@ Validate your diagrams via the commandline:
|
|
|
35
35
|
|
|
36
36
|
## Rules
|
|
37
37
|
|
|
38
|
-
Our [documentation](https://github.com/bpmn-io/bpmnlint/tree/
|
|
38
|
+
Our [documentation](https://github.com/bpmn-io/bpmnlint/tree/main/docs/rules#rules) lists all currenty implemented rules, the [`./rules` folder](https://github.com/bpmn-io/bpmnlint/tree/main/rules) contains each rules implementation.
|
|
39
39
|
|
|
40
40
|
Do you miss a rule that should be included? [Propose a new rule](https://github.com/bpmn-io/bpmnlint/issues/new?assignees=&labels=rules&template=NEW_RULE.md).
|
|
41
41
|
|
|
@@ -61,6 +61,19 @@ Add or customize rules using the `rules` block:
|
|
|
61
61
|
}
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
You may also extend from multiple configurations, including those provided by [custom plug-ins](#writing-a-plug-in):
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"extends": [
|
|
69
|
+
"bpmnlint:recommended",
|
|
70
|
+
"plugin:foo/recommended",
|
|
71
|
+
"plugin:@bar/bpmnlint-plugin-bar/recommended"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This will amend core `recommended` rules with `recommended` rulesets provided by `bpmnlint-plugin-foo` and `@bar/bpmnlint-plugin-bar`, respectively.
|
|
64
77
|
|
|
65
78
|
## API
|
|
66
79
|
|
|
@@ -118,6 +131,25 @@ npm init bpmnlint-plugin {PLUGIN_NAME}
|
|
|
118
131
|
|
|
119
132
|
Checkout the [bpmnlint-plugin-example](https://github.com/bpmn-io/bpmnlint-plugin-example) for details on how to define, test, and consume custom lint rules. Use the [bpmnlint playground](https://github.com/bpmn-io/bpmnlint-playground) to implement new rules with quick visual feedback.
|
|
120
133
|
|
|
134
|
+
> [!NOTE]
|
|
135
|
+
> Plug-ins must always follow the naming scheme `bpmnlint-plugin-{NAME_OF_YOUR_PLUGIN}` and may contain a namespace prefix.
|
|
136
|
+
|
|
137
|
+
When using your custom plug-in, reference its configuration or rules via the shorthand plug-in name, or the full identifier:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"extends": [
|
|
142
|
+
"bpmnlint:recommended",
|
|
143
|
+
"plugin:foo/recommended",
|
|
144
|
+
"plugin:@bar/bpmnlint-plugin-bar/recommended"
|
|
145
|
+
],
|
|
146
|
+
"rules": {
|
|
147
|
+
"foo/special-rule": "off",
|
|
148
|
+
"@bar/bar/other-rule": "warn"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
121
153
|
|
|
122
154
|
## Bundling
|
|
123
155
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmnlint",
|
|
3
3
|
"description": "Validate your BPMN diagrams based on configurable lint rules",
|
|
4
|
-
"version": "11.4.
|
|
4
|
+
"version": "11.4.4",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"bpmnlint",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"tiny-glob": "^0.2.9"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@bpmn-io/bpmnlint-generate-docs-images": "^0.
|
|
54
|
+
"@bpmn-io/bpmnlint-generate-docs-images": "^1.0.0",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
56
|
"chai": "^4.5.0",
|
|
57
57
|
"eslint": "^9.17.0",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const {
|
|
2
|
-
is
|
|
3
|
-
isAny
|
|
2
|
+
is
|
|
4
3
|
} = require('bpmnlint-utils');
|
|
5
4
|
|
|
6
5
|
const {
|
|
@@ -36,9 +35,9 @@ module.exports = function() {
|
|
|
36
35
|
reporter.report(flowElement.id, 'An <End Event> is not allowed in <Ad Hoc Sub Process>');
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
if (
|
|
38
|
+
if (is(flowElement, 'bpmn:IntermediateCatchEvent')) {
|
|
40
39
|
if (!flowElement.outgoing || flowElement.outgoing.length === 0) {
|
|
41
|
-
reporter.report(flowElement.id, 'An intermediate event inside <Ad Hoc Sub Process> must have an outgoing sequence flow');
|
|
40
|
+
reporter.report(flowElement.id, 'An intermediate catch event inside <Ad Hoc Sub Process> must have an outgoing sequence flow');
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -49,4 +48,4 @@ module.exports = function() {
|
|
|
49
48
|
check
|
|
50
49
|
});
|
|
51
50
|
|
|
52
|
-
};
|
|
51
|
+
};
|
package/rules/no-disconnected.js
CHANGED
|
@@ -34,6 +34,11 @@ module.exports = function() {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
// adhoc subprocesses can have disconnected activities
|
|
38
|
+
if (is(node.$parent, 'bpmn:AdHocSubProcess')) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
const incoming = node.incoming || [];
|
|
38
43
|
const outgoing = node.outgoing || [];
|
|
39
44
|
|
package/rules/no-implicit-end.js
CHANGED