1# bpmn-js-bpmnlint 2 3[](https://github.com/bpmn-io/bpmn-js-bpmnlint/actions?query=workflow%3ACI) 4 5Integrates [bpmnlint](https://github.com/bpmn-io/bpmnlint) into [bpmn-js](https://github.com/bpmn-io/bpmn-js). 6 7 8 9See this extension in action as part of the [bpmnlint playground](https://github.com/bpmn-io/bpmnlint-playground). 10 11 12## Usage 13 14Integrate the linter into [bpmn-js](https://github.com/bpmn-io/bpmn-js): 15 16```javascript 17import lintModule from 'bpmn-js-bpmnlint'; 18 19import 'bpmn-js-bpmnlint/dist/assets/css/bpmn-js-bpmnlint.css'; 20 21import BpmnModeler from 'bpmn-js/lib/Modeler'; 22 23import bpmnlintConfig from './.bpmnlintrc'; 24 25const modeler = new BpmnModeler({ 26 linting: { 27 bpmnlint: bpmnlintConfig 28 }, 29 additionalModules: [ 30 lintModule 31 ] 32}); 33``` 34 35 36## Bundle Lint Rules 37 38Use an appropriate plugin/loader for your module bundler (cf. [rollup-plugin-bpmnlint](https://github.com/nikku/rollup-plugin-bpmnlint), [bpmnlint-loader](https://github.com/nikku/bpmnlint-loader)) to bundle the bpmnlint configuration directly with your application as [shown above](#usage). 39 40Alternatively, pack your local `.bpmnlintrc` file using the [bpmnlint-pack-config](https://github.com/nikku/bpmnlint-pack-config) utility: 41 42```shell 43bpmnlint-pack-config -c .bpmnlintrc -o bundled-config.js 44``` 45 46 47## Plug-in Lint Rules 48 49Provide the [packed lint rules](#bundle-lint-rules) via the `linting.bpmnlint` option. You may set it dynamically, too: 50 51```javascript 52const linting = modeler.get('linting'); 53 54linting.setLinterConfig(bpmnlintConfig); 55``` 56 57 58## Resources 59 60* [Issues](https://github.com/bpmn-io/bpmn-js-bpmnlint/issues) 61* [Playground Project](https://github.com/bpmn-io/bpmnlint-playground) 62 63 64## Development Setup 65 66``` 67npm install 68npm run dev 69``` 70 71 72## License 73 74MIT 75