From 708a4185985530573fdd62581d84f1987bfe6cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E6=B2=9B=E6=9D=83?= Date: Wed, 16 Jun 2021 11:21:21 +0800 Subject: [PATCH] test commit lint --- .commitlintrc.js | 17 +++++++++++++++++ package.json | 1 + 2 files changed, 18 insertions(+) create mode 100644 .commitlintrc.js 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" } },