Skip to content

build(bpmn): adopt central @miragon/bpmnlint-plugin-rules - #27

Merged
emaarco merged 2 commits into
mainfrom
emaarco/migrate-to-miragon-bpmnlint
Aug 20, 2026
Merged

build(bpmn): adopt central @miragon/bpmnlint-plugin-rules#27
emaarco merged 2 commits into
mainfrom
emaarco/migrate-to-miragon-bpmnlint

Conversation

@emaarco

@emaarco emaarco commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What

Migrates BPMN linting to the central @miragon/bpmnlint-plugin-rules plugin (v0.5.0) using its default all config with no rule customization, wires it as a blocking gate that fails on warnings too, and adjusts the models (never the rules) so both diagrams pass.

Changes

Adopt the plugin as a blocking gate (build(bpmn))

  • Add @miragon/bpmnlint-plugin-rules@0.5.0 (exact pin); bump bpmnlint11.13.0 (exact — the plugin imports bpmnlint/rules/standard-size, first exported there).
  • .bpmnlintrc extends bpmnlint:recommended + plugin:camunda-compat/camunda-platform-7-24 (+ camunda moddle extension, matching the CIB seven engine) + plugin:@miragon/rules/all. No rules{} overrides.
  • lint:bpmn runs with --max-warnings=0, so warnings block the build too. The pre-commit hook and pre-merge.yml job pick this up automatically (Node 24, ≥ the plugin's node>=22).

Conform the models (refactor(bpmn))

  • element-id-naming (default camelCase): boundary events adopt the event_ prefix (boundary_contractNotSignedevent_contractNotSigned); existing camelCase local parts kept.
  • no-generated-ids: sequence flows get readable, stable camelCase ids (Flow_0cq39pqflow_requestToValidation, E01flow_withdrawalToReversal).
  • fake-join (from bpmnlint:recommended, now blocking): the three rejection paths merge through a new explicit exclusive gateway gateway_rejectionJoin before serviceTask_sendRejection.
  • Regenerated the typed process API; only shifted constant (BOUNDARY_CONTRACT_NOT_SIGNEDEVENT_CONTRACT_NOT_SIGNED) updated in its test. Propagated ids to the Bruno + Playwright scenarios and doc comments.

Verification

  • bpmnlint --max-warnings=0: green, 0 findings.
  • ./gradlew :service:app:test: passes (ArchUnit, JGiven process tests driving the engine, OpenAPI export). openapi.json: no drift. Frontend typecheck: clean.

Notes for the plugin team

  • No custom rules existed to remove/triage — the old .bpmnlintrc only extended bpmnlint:recommended.
  • Model-over-rule change worth a look: element-id-naming defaults to camelCase; the boundary-event convention forces the event_ prefix. That's a default, not a customization — flagged only so the team can decide if the preset should differ.

…ng gate

Replace the bare `bpmnlint:recommended` setup with the central Miragon plugin,
which bundles the structural rules, the Camunda-7 deployability layer and the
Miragon BPMN conventions behind one dependency.

- add @miragon/bpmnlint-plugin-rules@0.5.0 (exact pin)
- bump bpmnlint 11.12.1 -> 11.13.0 (exact; plugin peer needs >=11.13)
- .bpmnlintrc extends bpmnlint:recommended + camunda-compat/camunda-platform-7-24
  (+ camunda moddleExtension) + plugin:@miragon/rules/all (default config, no
  rule overrides), so every Miragon rule blocks at error
- lint:bpmn runs with --max-warnings=0 so warnings (e.g. standard-size, fake-join)
  also fail the build; the pre-commit hook and pre-merge CI job pick this up

No custom rules existed to remove (the old .bpmnlintrc only extended recommended).
Adjust the MODELS (not the rules) to satisfy the plugin's default config.

- element-id-naming (default camelCase): boundary events adopt the `event_`
  prefix (boundary_contractNotSigned -> event_contractNotSigned); the existing
  camelCase local parts are kept as-is
- no-generated-ids: sequence flows get readable, stable camelCase ids
  (Flow_0cq39pq -> flow_requestToValidation, E01 -> flow_withdrawalToReversal)
- fake-join (bpmnlint:recommended, now blocking via --max-warnings=0): the three
  rejection paths (invalid / not-solvent / not-signed) now merge through an
  explicit exclusive gateway `gateway_rejectionJoin` before `serviceTask_sendRejection`
- regenerate the typed process API (generateBpmnModels); SCREAMING_SNAKE constants
  are stable except the boundary->event prefix change
  (BOUNDARY_CONTRACT_NOT_SIGNED -> EVENT_CONTRACT_NOT_SIGNED, updated in the test)
- propagate flow/element ids to the Bruno + Playwright scenarios (activity ids /
  task-definition keys sent to engine-rest) and a few doc comments

bpmnlint --max-warnings=0 is green; ./gradlew :service:app:test passes;
openapi.json unchanged; frontend typecheck clean.
@emaarco
emaarco force-pushed the emaarco/migrate-to-miragon-bpmnlint branch from 6ebdf39 to 57d9eaf Compare August 20, 2026 15:30
@emaarco
emaarco enabled auto-merge (squash) August 20, 2026 15:34
@emaarco
emaarco merged commit fbe214c into main Aug 20, 2026
5 checks passed
@emaarco
emaarco deleted the emaarco/migrate-to-miragon-bpmnlint branch August 20, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant