Comparing version 1.0.0-alpha5 to 1.0.0-alpha6
@@ -9,2 +9,6 @@ # Changelog | ||
## 1.0.0-alpha6 | ||
* `DOCS`: documentation simplification / improvements | ||
## 1.0.0-alpha5 | ||
@@ -11,0 +15,0 @@ |
{ | ||
"name": "bpmnlint", | ||
"version": "1.0.0-alpha5", | ||
"version": "1.0.0-alpha6", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
117
README.md
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
19037
16
55