@forsakringskassan/commitlint-config 2.0.4 → 3.0.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 +12 -16
- package/dist/commitlint.js +1234 -1234
- package/dist/install.js +370 -11
- package/hooks.js +8 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -26,8 +26,8 @@ This package bundles `@commitlint/cli` so it does not have to be installed separ
|
|
|
26
26
|
|
|
27
27
|
This package provides two variants:
|
|
28
28
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
29
|
+
- `@forsakringskassan/commitlint-config/default`
|
|
30
|
+
- `@forsakringskassan/commitlint-config/no-jira`
|
|
31
31
|
|
|
32
32
|
The default configuration enforces a JIRA reference at the end of the header.
|
|
33
33
|
The `no-jira` variant does not enforce it.
|
|
@@ -46,26 +46,22 @@ or manually edit `package.json`:
|
|
|
46
46
|
}
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Git hooks
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
This package will by an postinstall script add needed git hooks, so by default you dont need to add anything in your application (more than adding this package as a depedency)
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
echo 'npm exec commitlint -- --edit "$1"' > .husky/commit-msg
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Lint staged
|
|
58
|
-
|
|
59
|
-
This package bundles `lint-staged` and can be used with a preconfigured setup.
|
|
60
|
-
Assuming husky is used add `.husky/pre-commit` with:
|
|
53
|
+
If you already have `husky`, `simple-git-hooks` or `lint-staged` in your `package.json` you need uninstall them first:
|
|
61
54
|
|
|
62
55
|
```bash
|
|
63
|
-
|
|
64
|
-
npm exec lint-staged -- --config "${configfile}" "$@"
|
|
56
|
+
npm rm lint-staged husky simple-git-hooks
|
|
65
57
|
```
|
|
66
58
|
|
|
67
|
-
|
|
59
|
+
### Disable hooks
|
|
60
|
+
|
|
61
|
+
To disable Git hooks from this repo, you can use environment `FK_COMMITLINT_SKIP` variable before installing.
|
|
62
|
+
Hooks will never be added in a CI environment such as Jenkins.
|
|
68
63
|
|
|
69
64
|
```bash
|
|
70
|
-
|
|
65
|
+
export FK_COMMITLINT_SKIP=1
|
|
66
|
+
npm install --save-dev @forsakringskassan/commitlint-config
|
|
71
67
|
```
|