Skip to content

Commit bd146ec

Browse files
committed
build: refine commitlint config
1 parent b182e7c commit bd146ec

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.commitlintrc.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ module.exports = {
99
],
1010
rules: {
1111
'scope-enum': [
12-
'cli',
13-
...VuepressPackages
14-
].map(name => `$${name}`)
12+
2,
13+
'always',
14+
[
15+
'cli',
16+
...VuepressPackages
17+
].map(name => `$${name}`)
18+
]
1519
}
1620
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
},
3131
"husky": {
3232
"hooks": {
33-
"pre-commit": "lint-staged"
33+
"pre-commit": "lint-staged",
34+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
3435
}
3536
},
3637
"lint-staged": {

0 commit comments

Comments
 (0)