diff --git a/.commitlintrc.js b/.commitlintrc.js new file mode 100644 index 0000000..3d2f350 --- /dev/null +++ b/.commitlintrc.js @@ -0,0 +1,17 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + 2, + 'always', + ['upd', 'feat', 'fix', 'refactor', 'docs', 'chore', 'style', 'revert'], + ], + 'type-case': [0], + 'type-empty': [0], + 'scope-empty': [0], + 'scope-case': [0], + 'subject-full-stop': [0, 'never'], + 'subject-case': [0, 'never'], + 'header-max-length': [0, 'always', 72], + }, +} diff --git a/package.json b/package.json index 352ecd3..9ff5bcb 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ }, "husky": { "hooks": { + "commit-msg": "commitlint -E $HUSKY_GIT_PARAMS", "pre-commit": "lint-staged" } },