chore: add commitlint

This commit is contained in:
Mo
2022-06-13 12:23:58 -05:00
parent aa9a7fbf31
commit eabe092d62
4 changed files with 10 additions and 11 deletions

4
.husky/commit-msg Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
yarn commitlint --edit $1

2
.husky/pre-commit Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

3
commitlint.config.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
}

View File

@@ -47,15 +47,5 @@
"webpack": "^5.72.0", "webpack": "^5.72.0",
"webpack-cli": "^4.9.2" "webpack-cli": "^4.9.2"
}, },
"packageManager": "yarn@3.2.1", "packageManager": "yarn@3.2.1"
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
} }