Closed nikku closed 2 years ago
This PR ensures that rules implemented locally are also resolved locally within the package.
To do that we check for a local package.json. If it exists we use the package name to normalize required configs and rules.
package.json
Adjustment must be done both when resolving rules as well as when compiling the linter configuration.
Given this enhancements local rules can be safely referenced by name (of the package):
bpmnlint-plugin-foobar -> index.js -> .bpmnlintrc = { "extends": "plugins:foobar/recommended" }
How to try out:
git clone https://github.com/bpmn-io/bpmnlint-plugin-example cd bpmnlint-plugin-example echo '{ "extends": "plugin:example/recommended" }' > .bpmnlintrc npx bpmnlint@bpmn-io/bpmnlint#local-package-resolution some-bpmn-diagram.bpmn
This PR ensures that rules implemented locally are also resolved locally within the package.
To do that we check for a local
package.json
. If it exists we use the package name to normalize required configs and rules.Adjustment must be done both when resolving rules as well as when compiling the linter configuration.
Given this enhancements local rules can be safely referenced by name (of the package):
How to try out: