@forsakringskassan/commitlint-config 3.0.4 → 3.0.5
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 +4 -11
- package/dist/install.js +3 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,20 +48,13 @@ or manually edit `package.json`:
|
|
|
48
48
|
|
|
49
49
|
## Git hooks
|
|
50
50
|
|
|
51
|
-
This package
|
|
51
|
+
This package uses a postinstall script to automatically add Git hooks to your application.
|
|
52
|
+
|
|
53
|
+
- Prettier and Esbuild will run before commit is created (if packages exist in your application
|
|
54
|
+
- The commit message will be validated.
|
|
52
55
|
|
|
53
56
|
If you already have `husky`, `simple-git-hooks` or `lint-staged` in your `package.json` you need uninstall them first:
|
|
54
57
|
|
|
55
58
|
```bash
|
|
56
59
|
npm rm lint-staged husky simple-git-hooks
|
|
57
60
|
```
|
|
58
|
-
|
|
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.
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
export FK_COMMITLINT_SKIP=1
|
|
66
|
-
npm install --save-dev @forsakringskassan/commitlint-config
|
|
67
|
-
```
|
package/dist/install.js
CHANGED
|
@@ -7389,7 +7389,8 @@ async function existingHuskyConfig(cwd, fileSystem) {
|
|
|
7389
7389
|
await fileSystem.stat(huskyPath);
|
|
7390
7390
|
const huskyFiles = await glob(`.husky/**/*`, {
|
|
7391
7391
|
fs: fileSystem,
|
|
7392
|
-
ignore: ".husky/_/**"
|
|
7392
|
+
ignore: ".husky/_/**",
|
|
7393
|
+
cwd
|
|
7393
7394
|
});
|
|
7394
7395
|
if (huskyFiles.length > 0) {
|
|
7395
7396
|
console.error(
|
|
@@ -7479,9 +7480,7 @@ async function setupGitHooks() {
|
|
|
7479
7480
|
console.log(result.output);
|
|
7480
7481
|
}
|
|
7481
7482
|
}
|
|
7482
|
-
|
|
7483
|
-
await setupGitHooks();
|
|
7484
|
-
}
|
|
7483
|
+
await setupGitHooks();
|
|
7485
7484
|
if (!import_is_ci.default) {
|
|
7486
7485
|
configureCommitTemplate();
|
|
7487
7486
|
}
|