mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(cli): update commit-lint config
This commit is contained in:
parent
4604f4c647
commit
2d979d3977
@ -36,15 +36,10 @@ yarn add @vant/cli --dev
|
|||||||
"test": "vant-cli test",
|
"test": "vant-cli test",
|
||||||
"lint": "vant-cli lint",
|
"lint": "vant-cli lint",
|
||||||
"build": "vant-cli build",
|
"build": "vant-cli build",
|
||||||
|
"prepare": "husky install",
|
||||||
"release": "vant-cli release",
|
"release": "vant-cli release",
|
||||||
"build-site": "vant-cli build-site"
|
"build-site": "vant-cli build-site"
|
||||||
},
|
},
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "lint-staged",
|
|
||||||
"commit-msg": "vant commit-lint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx,ts,tsx,vue}": "eslint --fix",
|
"*.{js,jsx,ts,tsx,vue}": "eslint --fix",
|
||||||
"*.{vue,css,less,scss}": "stylelint --fix"
|
"*.{vue,css,less,scss}": "stylelint --fix"
|
||||||
@ -70,4 +65,3 @@ yarn add @vant/cli --dev
|
|||||||
- [目录结构](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/directory.md)
|
- [目录结构](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/directory.md)
|
||||||
- [桌面端组件](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/desktop.md)
|
- [桌面端组件](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/desktop.md)
|
||||||
- [更新日志](https://github.com/youzan/vant/tree/dev/packages/vant-cli/changelog.md)
|
- [更新日志](https://github.com/youzan/vant/tree/dev/packages/vant-cli/changelog.md)
|
||||||
|
|
||||||
|
@ -59,3 +59,7 @@ npx vant-cli dev
|
|||||||
## commit-lint
|
## commit-lint
|
||||||
|
|
||||||
校验 commit message 的格式是否符合规范,需要配合 `husky` 在提交 commit 时触发。
|
校验 commit message 的格式是否符合规范,需要配合 `husky` 在提交 commit 时触发。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx husky add .husky/commit-msg 'npx --no-install vant-cli commit-lint $1'
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user