3.18.0 • Published 1 month ago

@camunda/linting v3.18.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@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

3.18.0

1 month ago

3.17.0

2 months ago

3.16.0

2 months ago

3.15.0

3 months ago

3.14.0

3 months ago

3.13.0

3 months ago

3.12.0

5 months ago

3.11.0

5 months ago

3.9.0

7 months ago

3.7.2

7 months ago

3.4.0

9 months ago

3.2.0

9 months ago

3.8.0

7 months ago

3.10.0

6 months ago

3.6.0

8 months ago

3.4.1

9 months ago

3.0.0

10 months ago

4.0.0-0

7 months ago

3.8.1

7 months ago

3.3.0

9 months ago

3.1.1

10 months ago

3.1.0

10 months ago

3.7.1

8 months ago

3.7.0

8 months ago

3.5.1

8 months ago

3.5.0

8 months ago

1.3.0

11 months ago

1.2.1

11 months ago

2.2.0

10 months ago

2.1.0

10 months ago

2.0.0

11 months ago

1.2.0

12 months ago

1.1.0

12 months ago

1.0.0

1 year ago

0.17.0

1 year ago

0.16.0

1 year ago

0.15.1

1 year ago

0.13.0

1 year ago

0.14.0

1 year ago

0.15.0

1 year ago

0.11.0

1 year ago

0.12.0

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.8.0

1 year ago

0.9.1

1 year ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.5.0-alpha.3

2 years ago

0.5.0-alpha.2

2 years ago

0.5.0-alpha.1

2 years ago

0.5.0-alpha.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago