Skip to content

Commit bcf33c0

Browse files
committed
docs: update commitlint -e usage
1 parent ce4f7f9 commit bcf33c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: docs/guides-local-setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ This allows us to add [git hooks](https://github.com/typicode/husky/blob/master/
3333
```json
3434
{
3535
"scripts": {
36-
"commitmsg": "commitlint -e"
36+
"commitmsg": "commitlint -e $GIT_PARAMS"
3737
}
3838
}
3939
```
4040

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`.
4242

4343
## Test
4444

0 commit comments

Comments
 (0)