bpmnlint-plugin-camunda-compat 2.49.0 → 2.49.1
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 +5 -2
- package/package.json +1 -1
- package/rules/utils/version.js +8 -2
package/README.md
CHANGED
|
@@ -16,14 +16,17 @@ npm install -D bpmnlint bpmnlint-plugin-camunda-compat
|
|
|
16
16
|
|
|
17
17
|
Add configuration corresponding to your execution platform and version to your [`.bpmnlintrc` configuration](https://github.com/bpmn-io/bpmnlint#configuration):
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```jsonc
|
|
20
20
|
{
|
|
21
21
|
"extends": [
|
|
22
22
|
"bpmnlint:recommended",
|
|
23
23
|
"plugin:camunda-compat/camunda-cloud-8-0"
|
|
24
24
|
],
|
|
25
25
|
"rules": {
|
|
26
|
-
"camunda-compat/
|
|
26
|
+
"camunda-compat/called-element": "off",
|
|
27
|
+
|
|
28
|
+
// some rules require a config with version to be provided
|
|
29
|
+
"camunda-compat/timer": ["warn", { "version": "8.0" }]
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
```
|
package/package.json
CHANGED
package/rules/utils/version.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const cmp = require('semver-compare');
|
|
2
2
|
|
|
3
|
-
module.exports.greaterOrEqual = function(
|
|
4
|
-
|
|
3
|
+
module.exports.greaterOrEqual = function(version, allowedVersion) {
|
|
4
|
+
if (!version) {
|
|
5
|
+
throw new Error(
|
|
6
|
+
'Rule requires { version } config, e.g. [ "warn", { "version": "8.0" } ]'
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return cmp(version, allowedVersion) !== -1;
|
|
5
11
|
};
|