diff --git a/.commitlintrc.js b/.commitlintrc.js index ac5a8cb6..ed00a8a9 100644 --- a/.commitlintrc.js +++ b/.commitlintrc.js @@ -9,8 +9,12 @@ module.exports = { ], rules: { 'scope-enum': [ - 'cli', - ...VuepressPackages - ].map(name => `$${name}`) + 2, + 'always', + [ + 'cli', + ...VuepressPackages + ].map(name => `$${name}`) + ] } } diff --git a/package.json b/package.json index 7cea2f8c..1a3e2de0 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged" + "pre-commit": "lint-staged", + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } }, "lint-staged": {