You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides-local-setup.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -33,12 +33,12 @@ This allows us to add [git hooks](https://github.com/typicode/husky/blob/master/
33
33
```json
34
34
{
35
35
"scripts": {
36
-
"commitmsg": "commitlint -e"
36
+
"commitmsg": "commitlint -e $GIT_PARAMS"
37
37
}
38
38
}
39
39
```
40
40
41
-
Using `commitmsg` gives us exactly what we want: It is executed everytime a new commit is created. Invoking `commitlint`with the `-e|--edit` flag causes it to correctly read the commit message from `.git/COMMIT_MSG`.
41
+
Using `commitmsg` gives us exactly what we want: It is executed everytime a new commit is created. Passimg husky's `$GIT_PARAMS` to `commitlint`via the `-e|--edit` flag directs it to the relevant edit file. `-e` defaults to `.git/COMMIT_EDITMSG`.
0 commit comments