@process-engine/bpmn-js-bpmnlint

bpmn-js integration for bpmnlint

Usage no npm install needed!

<script type="module">
  import processEngineBpmnJsBpmnlint from 'https://cdn.skypack.dev/@process-engine/bpmn-js-bpmnlint';
</script>

README

bpmn-js-bpmnlint

Integrates bpmnlint into bpmn-js.

Screenshot

See this extension in action as part of the bpmnlint playground.

Usage

Integrate the linter into bpmn-js:

import lintModule from 'bpmn-js-bpmnlint';

import BpmnModeler from 'bpmn-js/lib/Modeler';

import bpmnlintConfig from './.bpmnlintrc';

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 linter 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 -c .bpmnlintrc -o bundled-config.js

Alternatively you may use an appropriate plugin/loader for your module bundler (cf. rollup-plugin-bpmnlint, bpmnlint-loader) to bundle and consume the configuration directly as shown above.

Resources

Development Setup

npm install && npm run dev

License

MIT