Package detail

@camunda/linting

camunda5.2kMIT3.39.0

Linting for Camunda

bpmnlint, camunda

readme

@camunda/linting

CI

The BPMN linter used by the Camunda Desktop and Web Modeler. Batteries included. 🔋

Features

  • bundles bpmnlint and bpmnlint-plugin-camunda-compat
  • configures linter based on modeler:executionPlatform and modeler:executionPlatformVersion
  • creates error messages to be shown in desktop and web modeler
  • creates errors to be shown in properties panel
  • creates error overlays to be shown on canvas

Usage

import Modeler from 'bpmn-js/lib/Modeler';

import { Linter } from '@camunda/linting';

import lintingModule from '@camunda/linting/modeler';

import '@camunda/linting/assets/linting.css';

const modeler = new Modeler({
  additionalModules: [
    lintingModule
  ]
});

// configure to be used with desktop or web modeler
const linter = new Linter({
  modeler: 'web', // `desktop` or `web` modeler, defaults to `desktop`
  type: 'cloud' // `cloud` or `platform` diagrams, defaults to `cloud`
});

// lint by passing definitions
const reports = await linter.lint(definitions);

// or passing XML
const reports = await linter.lint(xml);

...

// update errors on canvas and in properties panel (requires bpmn-js-properties-panel >= 1.3.0)
modeler.get('linting').setErrors(reports);

// show error by selecting element and properties panel entry
modeler.get('linting').showError(report);

// activate and deactivate errors on canvas
modeler.get('linting').activate();
modeler.get('linting').deactivate();

Development

# install
npm i

# run tests
npm t

# run tests in watch mode
npm run test:watch

# run example
npm start

License

MIT

changelog

Changelog

All notable changes to @camunda/linting are documented here. We use semantic versioning for releases.

Unreleased

_Note: Yet to be released changes appear here._

3.39.0

3.38.0

3.37.1

  • FIX: allow intermediate throw events without outgoing sequence flows in ad-hoc-subprocess (#186)
  • DEPS: update to bpmnlint@11.4.3

3.37.0

3.36.1

3.36.0

  • FEAT: adjust error message for attached escalation boundary events
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.34.1

3.35.0

3.34.0

  • FEAT: rework message on elements that should not be used (bpmn-io/bpmnlint#173)
  • FIX: make link-event rule check only BPMN compliance
  • DEPS: update to bpmnlint@11.4.1

3.33.0

  • FEAT: integrate bpmnlint:correctness config (#132)

3.32.1

3.32.0

3.31.0

  • FEAT: allow task listeners in Camunda 8.8 or newer
  • FEAT: support bpmn:AdHocSubProcess for Camunda 8.7 or newer
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.31.0
  • DEPS: update to zeebe-bpmn-moddle@1.9.0

3.30.0

  • FEAT: rename "Zeebe user task" to "Camunda user task" (#126)
  • FEAT: mark job worker-based user task managed by Camunda as deprecated (#125)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.29.0

3.29.1

  • FIX: relax task-listener to not check implementation type (camunda/bpmnlint-plugin-camunda-compat#182)
  • FIX: do not mark job worker user task as incorrect
  • FIX: remove zeebe-user-task rule
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.28.1

3.29.0

  • FEAT: support for task listeners (#123)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.28.0
  • DEPS: update to zeebe-bpmn-moddle@1.7.0

3.28.0

3.27.2

3.27.1

3.27.0

3.26.1

  • FIX: support zeebe:PriorityDefinition errors (#116)

3.26.0

  • FEAT: support zeebe:VersionTag and zeebe:versionTag errors (#115)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.25.0
  • DEPS: update to zeebe-bpmn-moddle@1.6.0

3.25.0

  • FEAT: validate zeebe:priorityDefinition:priority (#113)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.24.0

3.24.0

  • FEAT: handle no-binding-type rule (#112)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.23.0

3.23.0

  • FEAT: support execution listeners (#111)
  • FIX: improve no-loop performance (bpmnlint-plugin-camunda-compat#165)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.22.0
  • DEPS: update to zeebe-bpmn-moddle@1.4.0

3.22.0

  • FEAT: support joining inclusive gateway in Camunda 8.6 (#109)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.21.0 (#109)

3.21.1

  • DEPS: update to bpmnlint-plugin-camunda-compat@2.20.2 (#108)

3.21.0

  • FEAT: show supported Camunda version in properties panel (#102)

3.20.0

  • FEAT: enable bpmnlint/no-bpmndi by default (#105)

3.19.0

  • DEPS: update to bpmnlint-plugin-camunda-compat@2.19.0

3.18.1

  • FIX: show error for process refs (#104)

3.18.0

FEAT: handle wait-for-completion rule (#103) DEPS: update to bpmnlint-plugin-camunda-compat@2.18.0

3.17.0

FEAT: handle no-zeebe-user-task rule (#101) FEAT: handle missing form property for Zeebe User Task (#101) DEPS: update to bpmnlint-plugin-camunda-compat@2.17.0 DEPS: update to bpmn-js-properties-panel@5.13.0 DEPS: update to camunda-bpmn-js-behaviors@1.3.0 DEPS: update to zeebe-bpmn-moddle@1.1.0

3.16.0

3.15.0

  • DEPS: update to bpmnlint@10

3.14.0

  • FEAT: simplify FEEL error messages (#97)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.15.0

3.13.0

  • FEAT: ensure user tasks have a formDefinition (#150)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.14.0

3.12.0

  • FEAT: allow collapsed subprocess in 8.4
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.13.0

3.11.0

  • FEAT: allow formKey and formId starting with v8.3 when linting start event forms (#149)
  • FIX: differentiate between desktop and web modeler when linting user task forms (#149)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.12.0

3.10.0

  • FEAT: add 8.4 and 7.21 config (#143)
  • FEAT: validate formId with Camunda 8.4 and newer (#144)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.11.1

3.9.0

  • FEAT: rename Camunda Platform to Camunda (#89)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.9.0

3.8.1

  • FIX: enable signal-reference rule for signal boundary events and signal intermediate catch events (#138)

3.8.0

  • FEAT: allow signal boundary, intermediate catch, and signal start events in sub-processes (#86)
  • FEAT: enable secrets rule for Camunda 8.3 (#86)
  • FIX: only display errors in properties panel (#86)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.8.0

3.7.2

  • FIX: correctly parse Camunda 7 XML (#85)

3.7.1

  • FIX: adjust no-loop error message (#84)
  • FIX: disable secrets rule (#84)
  • CHORE: adjust secrets warning message (#84)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.7.1

3.7.0

  • FEAT: add no-loop rule
  • FIX: link-event rule only checks link events
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.7.0

3.6.0

  • FEAT: add no-propagate-all-parent-variables rule
  • FEAT: add link-event rule
  • FEAT: add secrets rule
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.6.3

3.5.1

  • FIX: always scroll to element (#78)

3.5.0

  • FEAT: add documentation url to rules (#74)
  • FEAT: integrate start-form rule (#75)
  • FIX: correct linter annotation size (#77)
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.4.0

3.4.1

  • FIX: display overlays correctly when parent sets box-sizing (#76)

3.4.0

  • DEPS: update to bpmnlint-plugin-camunda-compat@2.3.0

3.3.0

  • DEPS: update to bpmnlint-plugin-camunda-compat@2.2.0

3.2.0

  • FEAT: improve overlay styles (#70)
  • FEAT: always show overlays and scale (#72)
  • FEAT: add execution platform and version to each report (#66)
  • FIX: fix time cycle error message (#66)
  • FIX: make root element selectable (by selecting nothing) (#66)
  • FIX: make missing time to live error selectable in properties panel (#66)
  • CHORE: create resolver using bpmnlint's compile-config helper (#67)
  • DEPS: update to bpmnlint@9.2.0
  • DEPS: update to bpmnlint-plugin-camunda-compat@2.1.0

3.1.1

  • CHORE: add LICENSE
  • DEPS: support bpmn-js-properties-panel@3

3.1.0

  • CHORE: persist all entryIds in the report (#63)

3.0.0

  • FEAT: rule errors are now reported as rule-error category instead of error (#109)
  • DEPS: update to bpmnlint@9.0.0

2.2.0

  • FEAT: add rule name to each report (#61)

2.1.0

  • FEAT: extend Camunda 7.19 rules to Camunda 7.20 (#101)
  • DEPS: update to bpmnlint-plugin-camunda-compat@1.4.0

2.0.0

  • FIX: fix Timer Type not supported error message (#58)
  • DEPS: update to bpmnlint-plugin-camunda-compat@1.3.2
  • DEPS update bpmn-js-properties-panel peer dependency to >= 2.0.0

Breaking Changes

  • support of legacy timerEventDefinitionDurationValue ID for Camunda 8 Timer group Value entry was removed; timerEventDefinitionValue ID is now used for all Value entries (#98)

1.3.0

  • FEAT: allow time date for timer intermediate catch and boundary event in Camunda 8.3 (#98)
  • DEPS: update to bpmnlint-plugin-camunda-compat@1.3.1

1.2.1

  • FIX: make modeler-moddle a production dependency

1.2.0

  • FEAT: add event-based-gateway-target rule (#96)
  • FEAT: allow conditional flow only if source is inclusive or exclusive gateway (#97)
  • DEPS: update to bpmnlint-plugin-camunda-compat@1.2.0

1.1.0

  • FEAT: support signal throw event in Camunda 8.3 (#93)
  • FEAT: add signal-reference rule (#93)
  • DEPS: update to bpmnlint-plugin-camunda-compat@1.1.0

1.0.0

  • FEAT: adjust element-type configuration and add no-signal-event-sub-process rule to allow signal start events in Camunda 8.2 (#88)
  • FIX: adjust error-reference rule to disallow error references without error code (#89)
  • DEPS: update to bpmnlint-plugin-camunda-compat@1.0.0

0.17.0

  • FEAT: require history time to live in Camunda 7.19 (#83)
  • FEAT: add task-schedule and no-task-schedule rules (#86)
  • DEPS: update to bpmnlint-plugin-camunda-compat@0.24.0

0.16.0

  • FEAT: allow error catch event without error code in Camunda 8.2 (#44)

0.15.1

  • FIX: display error message for disallowed FEEL error code

0.15.0

  • FEAT: skip non-executable process (#80)

0.14.0

  • FEAT: adjust error code and escalation error messages
  • FEAT: handle candidate users error
  • DEPS: update to bpmnlint-plugin-camunda-compat@0.20.0

0.13.0

0.12.0

  • FEAT: support FEEL expression in Script Task (#38)
  • DEPS: update to zeebe-bpmn-moddle@0.17.0
  • DEPS: update to bpmnlint-plugin-camunda-compat@0.17.0

0.11.0

  • FEAT: add link events to element-type rule (#63)
  • DEPS: update bpmnlint-plugin-camunda-compat to v0.16.0

0.10.0

  • FEAT: add executable-process rule (#56)
  • FEAT: add sequence-flow-condition rule (#58)
  • FEAT: add Camunda Platform 8.2 config (#59)
  • DEPS: update bpmnlint-plugin-camunda-compat to v0.15.1
  • DEPS: update bpmnlint to v8.1.1

0.9.1

  • FIX: handle minor and patch versions when getting execution platform label (#35)

0.9.0

  • FEAT: add feel rule to validate feel expressions (#51)
  • FEAT: add collapsed-subprocess rule to disallow collapsed subprocess (#52)
  • FEAT: error message hints at allowed version (#34)

0.8.0

  • FEAT: show lint error and warning annotations (#32)

0.7.2

  • CHORE: rename label for Camunda 8.0 (#28)

0.7.1

  • FIX: use correct label for Camunda 8.1 (#26)

0.7.0

  • FEAT: support bpmnlint plugins (#20)
  • FEAT: add timer rule (#45)
  • DEPS: update production dependencies

0.6.1

  • FIX: use setTimeout to work around properties panel focus issue (#19)

0.6.0

  • FEAT: add inclusive-gateway rule (#44) propertiesPanel.showEntry

    0.5.0

  • FIX: do not show annotations on update if inactive (#16)

0.5.0-alpha.3

  • CHORE: highlight linting annotation on selected instead of hover (f481cf22)

0.5.0-alpha.2

  • FIX: publish assets

0.5.0-alpha.1

  • FIX: publish modeler.js

0.5.0-alpha.0

  • FEAT: add bpmn-js plugin for canvas and properties panel errors (#11)
  • FEAT: add no-zeebe-properties rule (#43)

0.4.1

  • DEPS: broaden supported versions range of bpmn-js-properties-panel

0.4.0

  • FEAT: add duplicate task headers rule (#41)

0.3.5

  • FIX: ignore null properties (#39)

0.3.4

  • FIX: make bpmn-moddle and zeebe-bpmn-moddle production dependencies (#9)

0.3.3

  • FIX: fix business rule task error message in properties panel (#8)

0.3.2

  • FIX: make modeler-moddle dependency (e9d53714)

0.3.1

  • FIX: include properties-panel.js in published package (a532ba5b)

0.3.0

  • FEAT: add properties panel entry ID to reports (#7)
  • FEAT: add #getErrors function that creates properties panel errors from reports (#7)
  • FEAT: adjust connectors error message (#6)

Breaking Changes

  • lint is not static anymore, Linter must be instantiated

0.2.0

  • FEAT: add templates rule (#31)

0.1.1

  • FIX: lint subscription only if start event child of sub process (#34)

0.1.0