UNPKG

549 BMarkdownView Raw
1# @wuxh/commitlint-config
2
3## usage
4
5### install
6
7```bash
8npm i husky commitlint @wuxh/commitlint-config -D
9```
10
11### Edit `.commitlintrc`
12
13```json
14{
15 "extends": "@wuxh/commitlint-config"
16}
17```
18
19#### test config
20
21```bash
22npx commitlint --from HEAD~1 --to HEAD --verbose
23```
24
25### Add Hooks
26
27> see more [husky documentation](https://typicode.github.io/husky/#/?id=automatic-recommended)
28
29```bash
30npx husky install && npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
31```
32
33#### test hook
34
35```bash
36git commit -m "chore: xxx"
37```