How do I add camunda-modeler-linter-plugin to my camunda web modeler?
I tried installing the plugin npm i camunda-modeler-linter-plugin and then tried calling the register plugin
registerBpmnJSPlugin({ init: [
function(linting) {
linting.setLinterConfig(customLinterConfig);
linting.active = true;
}
]
});
I cant get this to work.
I understand that on desktop modeler you dump the plugin into plugin into plugins folder but how add any given plugin such as camunda-modeler-linter-plugin into web modeler. Any example of a web modeler consuming a plugin would really help.
Now, this works for me and I get linting. How do I tie in camunda-modeler-linter-plugin linting into bpmn-js-bpmnlint, is the question then. I understand that camunda-modeler-linter-plugin has to be a plugin into bpmn-js-bpmnlint and then I use bpmn-js-bpmnlint in my bpmn-js instance. But I need to know how to hook in the plugin into bpmn-js-bpmnlint.
Very new to bpmn, so apologies if this is a basic question.
How do I tie in camunda-modeler-linter-plugin linting into bpmn-js-bpmnlint, is the question then.
I fear I don’t quite get yet what you want to achieve. Can you maybe describe what parts of camunda-modeler-linter-plugin you need on top of bpmn-js-bpmnlint?
For example this linting error shows up on desktop modeler:
ity_1emng6a - A must have a defined <Message Reference>
But doesnt on the web modeler for me at the moment.
I tried both the below distributions:
import BpmnModeler from ‘camunda-bpmn-js/lib/camunda-platform/Modeler’;
and
import BpmnModeler from ‘camunda-bpmn-js/lib/camunda-cloud/Modeler’;
I dont refer to the built-in, I dont even know if the built-in can be used in the web modeler. If it can be, I may be good enough for me.
I use the plugin.
Please note, that I intend to use the web-modeler which is integrated into my application.
Thanks for the provided information. I created a CodeSandbox to show how it would work.
I assume you retrieved errors like “[bpmn-js-bpmnlint] Invalid lint rules configured.” somewhere in the console? That’s because simply inserting the .bpmnlintrc config file does not work, it needs to be bundled correctly so bpmnlint can work with it (cf. documentation).
In the example CodeSandbox, I simply transformed the config to the bundled JS file, which is also described in the attached docs.
I dont see all the linting errors in the sandbox. Like I said I want to replicate the desktop linting in web modeler. I think the built in is what I am looking for.
How do I enable the built-in linter in web modeler or alternatively replicate all those linting rules in the bomn-jsbpmnlint. Thanks again!