Comparing version 3.1.0 to 3.2.0
@@ -119,7 +119,7 @@ #!/usr/bin/env node | ||
async function handleConfig(config) { | ||
let parsedConfig; | ||
async function handleConfig(configString) { | ||
let config; | ||
try { | ||
parsedConfig = JSON.parse(config); | ||
config = JSON.parse(configString); | ||
} catch (e) { | ||
@@ -141,6 +141,7 @@ return logAndExit('Error: Could not parse configuration file', e); | ||
const linter = new Linter({ | ||
config, | ||
resolver: new NodeResolver() | ||
}); | ||
const lintResults = await linter.lint(moddleRoot, parsedConfig); | ||
const lintResults = await linter.lint(moddleRoot); | ||
@@ -147,0 +148,0 @@ logReports(lintResults); |
@@ -9,2 +9,6 @@ # Changelog | ||
## 3.2.0 | ||
* `FEAT`: add ability to pass linter configuration via constructor | ||
## 3.1.0 | ||
@@ -11,0 +15,0 @@ |
@@ -14,2 +14,3 @@ const testRule = require('./test-rule'); | ||
const { | ||
config, | ||
resolver | ||
@@ -22,2 +23,3 @@ } = options; | ||
this.config = config; | ||
this.resolver = resolver; | ||
@@ -170,3 +172,3 @@ | ||
* @param {ModdleElement} moddleRoot | ||
* @param {Object} config rule config | ||
* @param {Object} [config] the bpmnlint configuration to use | ||
* | ||
@@ -177,2 +179,4 @@ * @return {Object} lint results, keyed by category names | ||
config = config || this.config; | ||
// load rules | ||
@@ -179,0 +183,0 @@ return this.resolveRules(config).then((ruleDefinitions) => { |
{ | ||
"name": "bpmnlint", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
33906
1029
0