Socket
Socket
Sign inDemoInstall

bpmnlint

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmnlint - npm Package Compare versions

Comparing version 1.0.0-alpha5 to 1.0.0-alpha6

4

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## 1.0.0-alpha6
* `DOCS`: documentation simplification / improvements
## 1.0.0-alpha5

@@ -11,0 +15,0 @@

2

package.json
{
"name": "bpmnlint",
"version": "1.0.0-alpha5",
"version": "1.0.0-alpha6",
"main": "index.js",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,83 +5,34 @@ # bpmnlint

Validate and improve your BPMN diagrams.
Validate your BPMN diagrams based on configurable lint rules.
## Installing
## Usage
```sh
npm install -s bpmnlint
```
Install the utility via [npm](https://www.npmjs.com/package/bpmnlint) and validate your diagrams via the commandline:
Or:
```bash
> bpmnlint diagram.bpmn
```sh
yarn add bpmnlint
error: Process_1 is missing a Start Event
error: Process_1 is missing an End Event
```
## Usage
### As a command line tool
#### Using a local **.bpmnlintrc** configuration file
- Make sure to have a **.bpmnlintrc** configuration file in the directory where you are running the tool:
## Rule Configuration
```json
// .bpmnlintrc file
{
"rules": {
"label-required": "warn",
"start-event-required": "error",
"end-event-required": "error"
}
}
```
Create a `.bpmnlintrc` file in your working directory:
- Run the following command:
```sh
bpmnlint ./sample.bpmn
```
#### Using an explicit configuration file
- e.g.
```json
// some-config.json file
{
"rules": {
"label-required": "warn",
"start-event-required": "error",
"end-event-required": "error"
}
"extends": "bpmnlint:recommended"
}
```
- Run the following command:
```sh
bpmnlint ./sample.bpmn -c some-config.json
```
or
```sh
bpmnlint ./sample.bpmn --config some-config.json
```
Add or customize rules using the `rules` block:
> **Note:** For more information about the possible flags, run bpmnlint with the --help flag.
#### Output:
<img src="./output.png" />
### Configuration
The configuration file is a JSON object where the keys represent the rule names and their values provide information about these rules.
These values can be specified in an implicit or explicit way.
> **Note:** bpmnlint comes with a list of built-in rules: label-required, start-event-required, and end-event-required.
### Implicit Configuration
If the specified value for a rule is a number, it will hold the rule status flag:
- 0: the rule is off
- 1: problems reported by the rule are considered as warnings
- 2: problems reported by the rule are considerd as errors
```json
{
"extends": "bpmnlint:recommended",
"rules": {
"label-required": "warn"
"label-required": "off"
}

@@ -91,45 +42,15 @@ }

bpmnlint will then look for the rule first in the built-in rules.
If not found, bpmnlint will look for the rule in the npm packages installed as **bpmn-**rule-name (e.g. bpmn-no-implicit-parallel-gateway).
> **Important:** if you're referring to a non built-in rule, make sure to have it installed as an npm dependency.
## Writing / Consuming Custom Rules
### Explicit Configuration
If the specified value for a rule is an object, it will hold the following information:
- path to the the rule.
- flag: rule status flag
Checkout [bpmnlint-plugin-example](https://github.com/bpmn-io/bpmnlint-plugin-example) to learn how to define and consume custom lint rules.
```json
{
"plugins": [
"custom-rules"
],
"rules": {
"custom-rules/some-custom-rule": "error"
}
}
```
### Adding Custom Rules
> **Important:** The rule needs to have a suffix of 'bpmnlint-'.
## Visual Linting
Custom rules can be added in two ways:
Integrate the linter via [bpmn-js-bpmnlint](https://github.com/philippfromme/bpmn-js-bpmnlint) into your [next BPMN editor](https://github.com/bpmn-io/bpmn-js).
#### As an NPM Module
Please check out the example of [no-implicit-parallel-gateway](https://github.com/siffogh/bpmnlint-no-implicit-parallel-gateway)
#### As a Local Module
```json
{
"plugins": [
"custom-rules"
],
"rules": {
"custom-rules/some-custom-rule": "error"
}
}
```
## License
### As a Visual Linting Tool
Please check out [bpmn-js-bpmnlint](https://github.com/philippfromme/bpmn-js-bpmnlint).
MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc