Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@camunda/linting

camunda5.5kMIT3.37.1

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.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

3.35.0

3.34.0

3.33.0

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

3.32.1

3.32.0

3.31.0

3.30.0

3.29.1

3.29.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

3.25.0

3.24.0

3.23.0

3.22.0

3.21.1

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

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.0DEPS: update tobpmn-js-properties-panel@5.13.0DEPS: update tocamunda-bpmn-js-behaviors@1.3.0DEPS: update tozeebe-bpmn-moddle@1.1.0`

3.16.0

3.15.0

  • DEPS: update to bpmnlint@10

3.14.0

3.13.0

3.12.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

3.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

3.7.0

3.6.0

3.5.1

  • FIX: always scroll to element (#78)

3.5.0

3.4.1

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

3.4.0

3.3.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

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

1.2.1

  • FIX: make modeler-moddle a production dependency

1.2.0

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

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

0.13.0

0.12.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