Awesome
dmn-js-dmnlint
Integrates dmnlint into dmn-js.
See this extension in action as part of the dmnlint playground (TODO).
Usage
Integrate the linter into dmn-js:
import { DrdLinting } from 'dmn-js-dmnlint';
import DmnModeler from 'dmn-js/lib/Modeler';
import dmnlintConfig from './.dmnlintrc';
var modeler = new DmnModeler({
common: {
linting: dmnlintConfig
},
drd: {
additionalModules: [
DrdLinting
]
}
});
Bundle Lint Rules
Use an appropriate plugin/loader for your module bundler (cf. rollup-plugin-dmnlint, dmnlint-loader) to bundle the dmnlint configuration directly with your application as shown above.
Alternatively, pack your local .dmnlintrc
file using the dmnlint-pack-config (TODO) utility:
dmnlint-pack-config -c .dmnlintrc -o bundled-config.js
Plug-in Lint Rules
Provide the packed lint rules via the linting.dmnlint
option. You may set it dynamically, too:
var linting = modeler.get('linting');
linting.setLinterConfig(dmnlintConfig);
Resources
Development Setup
npm install
npm run dev
Credits
The project is based on dmn-js-dmnlint
built by philippfromme.
License
MIT