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
+10-2
Original file line number
Diff line number
Diff line change
@@ -31,19 +31,27 @@ npm install husky --save-dev
31
31
# or
32
32
yarn add husky --dev
33
33
34
-
#Active hooks
34
+
#Activate hooks
35
35
npx husky install
36
36
# or
37
37
yarn husky install
38
+
```
39
+
40
+
### Add hook
38
41
39
-
# Add hook
42
+
```sh
40
43
cat <<EEE > .husky/commit-msg
41
44
#!/bin/sh
42
45
. "\$(dirname "\$0")/_/husky.sh"
43
46
44
47
npx --no -- commitlint --edit "\${1}"
45
48
EEE
49
+
```
50
+
51
+
Make hook executable
46
52
53
+
```sh
54
+
chmod a+x .husky/commit-msg
47
55
```
48
56
49
57
**Please note that currently @commitlint/cli doesn't support yarn v2 Plug'n'Play (using yarn v2 with `nodeLinker: node-modules` in your .yarnrc.yml file may work sometimes)**\
0 commit comments