Skip to content

Commit e1f9c3b

Browse files
authored
chore: add commitlint (#239)
1 parent c9128cf commit e1f9c3b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

commitlint.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
"type-enum": [2, "always", [
5+
'feat',
6+
'fix',
7+
'docs',
8+
'test',
9+
'chore'
10+
]]
11+
}
12+
}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"yargs": "^8.0.2"
2626
},
2727
"devDependencies": {
28+
"@commitlint/cli": "^7.5.2",
29+
"@commitlint/config-conventional": "^7.5.0",
2830
"generate-changelog": "^1.7.1",
2931
"husky": "^2.1.0",
3032
"jest": "^20.0.4",
@@ -56,7 +58,8 @@
5658
},
5759
"husky": {
5860
"hooks": {
59-
"pre-commit": "lint-staged"
61+
"pre-commit": "lint-staged",
62+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
6063
}
6164
},
6265
"lint-staged": {

0 commit comments

Comments
 (0)