Skip to content

Commit 18847cc

Browse files
authored
Merge pull request #98 from 142vip/feat/commit-lint
2 parents 16c924a + 9958944 commit 18847cc

File tree

3 files changed

+312
-2
lines changed

3 files changed

+312
-2
lines changed

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] }

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"scripts": {
1717
"preinstall": "chmod +x ./scripts/*",
18-
"prepare": "rm -f .husky/pre-commit && husky install && npx husky add .husky/pre-commit \"npx lint-staged\" && chmod +x .husky/pre-commit",
18+
"prepare": "rm -f .husky/pre-commit && husky install && npx husky add .husky/pre-commit \"npx lint-staged\" && npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}' && chmod +x .husky/pre-commit",
1919
"dev": "vuepress dev docs",
2020
"build": "vuepress build docs",
2121
"build:proxy": "./scripts/bundle build_proxy",
@@ -31,6 +31,8 @@
3131
"clean": "快速删除本地依赖"
3232
},
3333
"devDependencies": {
34+
"@commitlint/cli": "^18.2.0",
35+
"@commitlint/config-conventional": "^18.1.0",
3436
"@typescript-eslint/eslint-plugin": "^5.62.0",
3537
"@typescript-eslint/parser": "^5.62.0",
3638
"@vuepress/client": "2.0.0-beta.67",

0 commit comments

Comments
 (0)