Skip to content

Commit

Permalink
docs: add instructions to use the package installed locally (#3626)
Browse files Browse the repository at this point in the history
  • Loading branch information
donaminos committed Jul 3, 2023
1 parent e74f1a9 commit c2613aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ yarn husky install
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
```

**Or use installed package instead**
```
npm pkg set scripts.commitlint="commitlint --edit"
npx husky add .husky/commit-msg 'npm run commitlint ${1}'
```


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.

**Detailed Setup instructions**
Expand Down
6 changes: 6 additions & 0 deletions docs/guides-local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ yarn husky install
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
```

**Or use installed package instead**
```
npm pkg set scripts.commitlint="commitlint --edit"
npx husky add .husky/commit-msg 'npm run commitlint ${1}'
```

**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)**\
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.

Expand Down

0 comments on commit c2613aa

Please sign in to comment.