Skip to content

Commit f852cb2

Browse files
Merge pull request #10 from conventional-changelog/master
[pull] master from conventional-changelog:master
2 parents bc18078 + c2613aa commit f852cb2

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ yarn husky install
112112
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
113113
```
114114

115+
**Or use installed package instead**
116+
```
117+
npm pkg set scripts.commitlint="commitlint --edit"
118+
npx husky add .husky/commit-msg 'npm run commitlint ${1}'
119+
```
120+
121+
115122
Check the [husky documentation](https://typicode.github.io/husky/#/?id=manual) on how you can automatically have Git hooks enabled after install for different `yarn` versions.
116123

117124
**Detailed Setup instructions**

docs/guides-local-setup.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ yarn husky install
4343
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
4444
```
4545

46+
**Or use installed package instead**
47+
```
48+
npm pkg set scripts.commitlint="commitlint --edit"
49+
npx husky add .husky/commit-msg 'npm run commitlint ${1}'
50+
```
51+
4652
**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)**\
4753
Check the [husky documentation](https://typicode.github.io/husky/#/?id=manual) on how you can automatically have Git hooks enabled after install for different `yarn` versions.
4854

0 commit comments

Comments
 (0)