bpmnlint 11.4.1 → 11.4.3

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/master/docs/rules#rules) lists all currenty implemented rules, the [`./rules` folder](https://github.com/bpmn-io/bpmnlint/tree/master/rules) contains each rules implementation.
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.1",
4
+ "version": "11.4.3",
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.4.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",
@@ -28,7 +28,7 @@ module.exports = function() {
28
28
  if (!isAny(node, [
29
29
  'bpmn:Process',
30
30
  'bpmn:SubProcess'
31
- ])) {
31
+ ]) || is(node, 'bpmn:AdHocSubProcess')) {
32
32
  return;
33
33
  }
34
34
 
@@ -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
 
@@ -63,6 +63,10 @@ module.exports = function() {
63
63
  return false;
64
64
  }
65
65
 
66
+ if (is(node.$parent, 'bpmn:AdHocSubProcess')) {
67
+ return false;
68
+ }
69
+
66
70
  if (is(node, 'bpmn:EndEvent')) {
67
71
  return false;
68
72
  }
@@ -29,6 +29,10 @@ module.exports = function() {
29
29
  return false;
30
30
  }
31
31
 
32
+ if (is(node.$parent, 'bpmn:AdHocSubProcess')) {
33
+ return false;
34
+ }
35
+
32
36
  if (is(node, 'bpmn:SubProcess') && node.triggeredByEvent) {
33
37
  return false;
34
38
  }
@@ -28,7 +28,7 @@ module.exports = function() {
28
28
  if (!isAny(node, [
29
29
  'bpmn:Process',
30
30
  'bpmn:SubProcess'
31
- ])) {
31
+ ]) || is(node, 'bpmn:AdHocSubProcess')) {
32
32
  return;
33
33
  }
34
34