bpmn-js-bpmnlint
Integrates bpmnlint into bpmn-js.
Usage
Integrate the linter into bpmn-js:
import lintModule from 'bpmn-js-bpmnlint';
import BpmnModeler from 'bpmn-js/lib/Modeler';
import bpmnlintConfig from './bundled-config';
var modeler = new BpmnModeler({
linting: {
bpmnlint: bpmnlintConfig
},
additionalModules: [
lintModule
]
});
Configure Lint Rules
When instantiating bpmn-js you must use the linting.bpmnlint
option to provide lint rules and their configuration.
The option takes a packed bpmnlint configuration which you may create from your local .bpmnlintrc
by using the bpmnlint-pack-config utility:
bpmnlint-pack-config -o bundled-config.js
Include the resulting bundled-config.js
in your application and pass it to bpmn-js on instantiation as shown above.
Note: Do not forget to re-pack the configuration on lint rule changes.
Resources
Development Setup
npm install && npm run dev
License
MIT