Skip to content

Commit 85a660d

Browse files
escapedcatmarionebl
authored andcommitted
docs: add new section #237 (#591)
1 parent cea4564 commit 85a660d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

docs/_sidebar.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
* [Configuration](reference-configuration.md)
1414
* [Rules](reference-rules.md)
1515
* [API](reference-api.md)
16+
* [Examples](reference-examples.md)

docs/reference-examples.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Examples
2+
3+
These examples show common usages of how commitlint can be configured.
4+
5+
6+
## Validate for issue/ticket numbers
7+
8+
In your `package.json` add:
9+
10+
```js
11+
commitlint: {
12+
'rules': {
13+
'references-empty': [2, 'never'],
14+
},
15+
parserPreset: {
16+
parserOpts: {
17+
issuePrefixes: ['PROJ-']
18+
}
19+
},
20+
}
21+
```
22+
23+

0 commit comments

Comments
 (0)