Skip to content

Commit 6b0f1de

Browse files
committed
docs: describe parse usage
1 parent 2210dd9 commit 6b0f1de

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

@commitlint/parse/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
> Parse commit messages to structured data
2+
3+
# @commitlint/parse
4+
5+
## Install
6+
7+
```
8+
npm install --save @commitlint/parse
9+
```
10+
11+
## Use
12+
13+
```js
14+
const parse = require('@commitlint/parse');
15+
```
16+
17+
## API
18+
19+
### parse(message: string, parser: Function, parserOpts: Object)
20+
21+
* **message**: Commit message to parser
22+
* **parser**: Sync parser function to use. Defaults to `sync` of `conventional-commits-parser`
23+
* **parserOpts**: Options to pass to `parser`
24+
```js
25+
{
26+
commentChar: null, // character indicating comment lines
27+
issuePrefixes: ['#'] // prefix characters for issue references
28+
}
29+
```

0 commit comments

Comments
 (0)