Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3dc44d3

Browse files
author
Ben McKernan
committed
docs: Add installation and usage instructions to the README
1 parent 2b10ff0 commit 3dc44d3

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

‎README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,42 @@
11
# @episerver/commitlint-plugin-references
2+
3+
A `commitlint` rule for conditionally requiring references in commit messages for given types.
4+
5+
## Installation
6+
7+
**yarn**
8+
```sh
9+
yarn add --dev @episerver/commitlint-plugin-references
10+
```
11+
12+
**npm**
13+
```sh
14+
npm install --save-dev @episerver/commitlint-plugin-references
15+
```
16+
17+
## Usage
18+
19+
To configure that references should never be empty for `fix` and `feat`. It is also possible to specify the issue prefix in `parserPreset`, the default value is `#`.
20+
21+
```js
22+
module.exports = {
23+
plugins: [
24+
"@episerver/references"
25+
],
26+
rules: {
27+
"references-empty-enum": [
28+
2,
29+
"never",
30+
[
31+
"fix",
32+
"feat"
33+
]
34+
]
35+
},
36+
parserPreset: {
37+
parserOpts: {
38+
issuePrefixes: ["ABC-"]
39+
}
40+
}
41+
};
42+
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /