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 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
- ```json
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/timer": "off"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "2.49.0",
3
+ "version": "2.49.1",
4
4
  "description": "A bpmnlint plug-in for Camunda compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,11 @@
1
1
  const cmp = require('semver-compare');
2
2
 
3
- module.exports.greaterOrEqual = function(a, b) {
4
- return cmp(a, b) !== -1;
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
  };