From 5511e72f1eac0d47b531f11ce8cd836b565dc905 Mon Sep 17 00:00:00 2001 From: Denis Gorbachev <829578+DenisGorbachev@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:26:30 +0700 Subject: [PATCH] misc: allow more types in commitlint --- commitlint.config.mjs | 31 ++++++++++++++++++++++++++++++- install.sh | 3 ++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/commitlint.config.mjs b/commitlint.config.mjs index 7c4ff4d..93c0d81 100644 --- a/commitlint.config.mjs +++ b/commitlint.config.mjs @@ -1 +1,30 @@ -export default { extends: ['@commitlint/config-conventional'] } +const severity = { + disable: 0, + warn: 1, + error: 2, +} + +export default { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + severity.error, + 'always', + [ + 'build', + 'chore', + 'misc', + 'other', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test', + ], + ], + }, +} diff --git a/install.sh b/install.sh index b7aa253..ef25b62 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,8 @@ npm install --global \ remark-validate-links@8.0.0 \ remark-lint-no-dead-urls@1.1.0 \ @commitlint/cli@19.3.0 \ - @commitlint/config-conventional@19.2.2 + @commitlint/config-conventional@19.2.2 \ + @commitlint/types@19.0.3 cargo install --git https://github.com/DenisGorbachev/cargo-doc2readme --branch dev cargo install cargo-machete