@forsakringskassan/commitlint-config 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/bin/cli.js +2 -0
- package/bin/install.js +2 -0
- package/dist/cli/commitlint.js +40729 -0
- package/dist/cli/templates/commit.hbs +61 -0
- package/dist/cli/templates/footer.hbs +11 -0
- package/dist/cli/templates/header.hbs +25 -0
- package/dist/cli/templates/template.hbs +16 -0
- package/dist/config/default.js +179 -0
- package/dist/config/no-jira.js +154 -0
- package/dist/config/templates/commit.hbs +30 -0
- package/dist/config/templates/footer.hbs +0 -0
- package/dist/config/templates/header.hbs +9 -0
- package/dist/config/templates/template.hbs +23 -0
- package/dist/format.js +1667 -0
- package/dist/install.js +316 -0
- package/dist/parser.js +491 -0
- package/gitmessage +52 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @forsakringskassan/commitlint-config
|
|
2
|
+
|
|
3
|
+
Based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) with additional checks for JIRA.
|
|
4
|
+
|
|
5
|
+
> <type>[optional scope]: <subject> (<reference>)
|
|
6
|
+
>
|
|
7
|
+
> [optional body]
|
|
8
|
+
>
|
|
9
|
+
> [optional footer(s)]
|
|
10
|
+
|
|
11
|
+
1. `fix: ` fixes a bug and results in a `PATCH` release.
|
|
12
|
+
2. `feat: ` introduces a new feature and results in a `MINOR` release.
|
|
13
|
+
3. `BREAKING CHANGE: ` in the footer followed by a description results in a `MAJOR` release. The description is added to the changelog.
|
|
14
|
+
4. `types` other than `fix` and `feat` is allowed, see list at [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum)
|
|
15
|
+
5. `(fixes XYZ-123)` or `(refs XYZ-123)` JIRA reference must be included after subject.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
$ npm install --save-dev @forsakringskassan/commitlint-config
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This package bundles `@commitlint/cli` so it does not have to be installed separately.
|
|
24
|
+
|
|
25
|
+
## Configuration
|
|
26
|
+
|
|
27
|
+
This package provides two variants:
|
|
28
|
+
|
|
29
|
+
- `@forsakringskassan/commitlint-config/default`
|
|
30
|
+
- `@forsakringskassan/commitlint-config/no-jira`
|
|
31
|
+
|
|
32
|
+
The default configuration enforces a JIRA reference at the end of the header.
|
|
33
|
+
The `no-jira` variant does not enforce it.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm pkg set commitlint.extends=@forsakringskassan/commitlint-config/default
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
or manually edit `package.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"commitlint": {
|
|
44
|
+
"extends": "@forsakringskassan/commitlint-config/default"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
As a husky hook:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
echo 'npm exec commitlint -- --edit "$1"' > .husky/commit-msg
|
|
55
|
+
```
|
package/bin/cli.js
ADDED
package/bin/install.js
ADDED