bpmn-js-bpmnlint
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -103,2 +103,3 @@ import { assign, groupBy, reduce } from 'min-dash'; | ||
const { | ||
config, | ||
resolver | ||
@@ -111,2 +112,3 @@ } = options; | ||
this.config = config; | ||
this.resolver = resolver; | ||
@@ -259,3 +261,3 @@ | ||
* @param {ModdleElement} moddleRoot | ||
* @param {Object} config rule config | ||
* @param {Object} [config] the bpmnlint configuration to use | ||
* | ||
@@ -266,2 +268,4 @@ * @return {Object} lint results, keyed by category names | ||
config = config || this.config; | ||
// load rules | ||
@@ -425,11 +429,12 @@ return this.resolveRules(config).then((ruleDefinitions) => { | ||
var noopResolver = { | ||
resolveRule: function() { | ||
return null; | ||
} | ||
var emptyConfig = { | ||
resolver: { | ||
resolveRule: function() { | ||
return null; | ||
} | ||
}, | ||
config: {} | ||
}; | ||
var emptyConfig = { }; | ||
function Linting( | ||
@@ -441,7 +446,6 @@ config, bpmnjs, canvas, | ||
if ('bpmnlint' in config) { | ||
this._config = config.bpmnlint.config; | ||
this._resolver = config.bpmnlint.resolver; | ||
this._linterConfig = config.bpmnlint; | ||
} | ||
if (!this._config || !this._resolver) { | ||
if (!this._linterConfig || !this._linterConfig.config || !this._linterConfig.resolver) { | ||
@@ -454,4 +458,3 @@ console.warn( | ||
this._config = emptyConfig; | ||
this._resolver = noopResolver; | ||
this._linterConfig = emptyConfig; | ||
} | ||
@@ -799,12 +802,7 @@ | ||
var config = this._config; | ||
var resolver = this._resolver; | ||
var definitions = this._bpmnjs.getDefinitions(); | ||
var linter$$1 = new linter({ | ||
resolver: resolver | ||
}); | ||
var linter$$1 = new linter(this._linterConfig); | ||
return linter$$1.lint(definitions, config); | ||
return linter$$1.lint(definitions); | ||
}; | ||
@@ -811,0 +809,0 @@ |
@@ -105,2 +105,3 @@ 'use strict'; | ||
const { | ||
config, | ||
resolver | ||
@@ -113,2 +114,3 @@ } = options; | ||
this.config = config; | ||
this.resolver = resolver; | ||
@@ -261,3 +263,3 @@ | ||
* @param {ModdleElement} moddleRoot | ||
* @param {Object} config rule config | ||
* @param {Object} [config] the bpmnlint configuration to use | ||
* | ||
@@ -268,2 +270,4 @@ * @return {Object} lint results, keyed by category names | ||
config = config || this.config; | ||
// load rules | ||
@@ -427,11 +431,12 @@ return this.resolveRules(config).then((ruleDefinitions) => { | ||
var noopResolver = { | ||
resolveRule: function() { | ||
return null; | ||
} | ||
var emptyConfig = { | ||
resolver: { | ||
resolveRule: function() { | ||
return null; | ||
} | ||
}, | ||
config: {} | ||
}; | ||
var emptyConfig = { }; | ||
function Linting( | ||
@@ -443,7 +448,6 @@ config, bpmnjs, canvas, | ||
if ('bpmnlint' in config) { | ||
this._config = config.bpmnlint.config; | ||
this._resolver = config.bpmnlint.resolver; | ||
this._linterConfig = config.bpmnlint; | ||
} | ||
if (!this._config || !this._resolver) { | ||
if (!this._linterConfig || !this._linterConfig.config || !this._linterConfig.resolver) { | ||
@@ -456,4 +460,3 @@ console.warn( | ||
this._config = emptyConfig; | ||
this._resolver = noopResolver; | ||
this._linterConfig = emptyConfig; | ||
} | ||
@@ -801,12 +804,7 @@ | ||
var config = this._config; | ||
var resolver = this._resolver; | ||
var definitions = this._bpmnjs.getDefinitions(); | ||
var linter$$1 = new linter({ | ||
resolver: resolver | ||
}); | ||
var linter$$1 = new linter(this._linterConfig); | ||
return linter$$1.lint(definitions, config); | ||
return linter$$1.lint(definitions); | ||
}; | ||
@@ -813,0 +811,0 @@ |
{ | ||
"name": "bpmn-js-bpmnlint", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "bpmn-js integration for bpmnlint", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"bpmnlint": "^3.0.0", | ||
"bpmnlint": "^3.2.0", | ||
"min-dash": "^3.1.0", | ||
@@ -40,0 +40,0 @@ "min-dom": "^0.2.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
195725
1375
Updatedbpmnlint@^3.2.0