Integrates dmnlint into dmn-js.
See this extension in action as part of the dmnlint playground (TODO).
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
]
}
});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.jsProvide the packed lint rules via the linting.dmnlint option. You may set it dynamically, too:
var linting = modeler.get('linting');
linting.setLinterConfig(dmnlintConfig);npm install
npm run devThe project is based on dmn-js-dmnlint built by philippfromme.
MIT