bpmn-io / bpmnlint

Validate BPMN diagrams based on configurable lint rules.
MIT License
119 stars 36 forks source link

Resolve Explicitly Exported Plugin Rules #99

Closed philippfromme closed 1 year ago

philippfromme commented 1 year ago

Gives plugin authors the freedom to choose their own plugin structure (cf. https://github.com/camunda/bpmnlint-plugin-camunda-compat/pull/87).

Example:

module.exports = {
  rules: {
    baz: './foo/bar/baz'
  }
};

Similar to ESLint, just supporting path references over require calls; require calls cannot easily be bundled for the browser, cf. https://github.com/bpmn-io/bpmnlint/pull/99#discussion_r1154061535, https://github.com/bpmn-io/bpmnlint/pull/99#issuecomment-1521983034.


Related to https://github.com/camunda/bpmnlint-plugin-camunda-compat/pull/87

philippfromme commented 1 year ago

@nikku I separated the changes into one commit that refactors the existing tests before the new feature is added by a second commit. Hopefully, that's easier to review.

philippfromme commented 1 year ago

@nikku I added a commit testing the compilation of local configs. It was indeed missing. Feel free to squash.

philippfromme commented 1 year ago

@nikku I've implemented what you proposed. Please have a look.

nikku commented 1 year ago

As discussed with @philippfromme:

barmac commented 1 year ago

I converted this to draft. @philippfromme feel free to mark it as ready for review when it is.

nikku commented 1 year ago

@philippfromme This looks simple enough now. Added the discussed improvements:

Check it out, give me a :+1: and I'll do a final PR cleanup before merging it.

philippfromme commented 1 year ago

Check it out, give me a 👍 and I'll do a final PR cleanup before merging it.

Let me have a quick look!

nikku commented 1 year ago

Assigning @barmac and @smbea for review (non-blocking). Just FYI. :)

nikku commented 1 year ago

@philippfromme https://github.com/bpmn-io/bpmnlint/pull/99/commits/a20a2577ecee449ce3e476f0096864fb17ca2deb should wrap up this topic.

philippfromme commented 1 year ago

I verified it works with bpmnlint-plugin-camunda-compat.

nikku commented 1 year ago

Awesome :).

nikku commented 1 year ago

Will go ahead and release this.

nikku commented 1 year ago

Never mind. This worked great here but utterly fails on master. Gotta investigate what is going on there.

nikku commented 1 year ago

This did the trick.