Skip to content

Commit

Permalink
chore: commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
cfour-hey committed Dec 11, 2019
1 parent e0fa0e2 commit 8647dc4
Show file tree
Hide file tree
Showing 4 changed files with 543 additions and 23 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ yarn lint

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

## 规范

### [commitlint](https://github.com/conventional-changelog/commitlint)
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"vuex": "^3.1.2"
},
"devDependencies": {
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
Expand Down Expand Up @@ -47,7 +49,8 @@
"last 2 versions"
],
"gitHooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"commit-msg": "commitlint -e"
},
"lint-staged": {
"*.{js,vue}": [
Expand Down
Loading

0 comments on commit 8647dc4

Please sign in to comment.