From 78367650ec0624bfd07e32f278e6ad2ad806463c Mon Sep 17 00:00:00 2001 From: lisonge Date: Mon, 16 Oct 2023 17:26:50 +0800 Subject: [PATCH] chore: Disable commitlint subject-case --- .husky/commit-msg | 2 +- commitlint.config.cts | 8 ++++++++ package.json | 1 + pnpm-lock.yaml | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 commitlint.config.cts diff --git a/.husky/commit-msg b/.husky/commit-msg index 97681ced..7d683bb8 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pnpm exec commitlint --edit ${1} +pnpm exec commitlint --config commitlint.config.cts --edit ${1} diff --git a/commitlint.config.cts b/commitlint.config.cts new file mode 100644 index 00000000..10a45950 --- /dev/null +++ b/commitlint.config.cts @@ -0,0 +1,8 @@ +import type { UserConfig } from '@commitlint/types'; + +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'subject-case': [0], + }, +} as UserConfig; diff --git a/package.json b/package.json index 1871c6f9..dc9234f9 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "devDependencies": { "@commitlint/cli": "^17.7.1", "@commitlint/config-conventional": "^17.7.0", + "@commitlint/types": "^17.4.4", "@gkd-kit/selector": "0.0.14", "@types/lodash": "^4.14.195", "@types/node": "^20.4.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5790ace..3f9b83a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ devDependencies: '@commitlint/config-conventional': specifier: ^17.7.0 version: 17.7.0 + '@commitlint/types': + specifier: ^17.4.4 + version: 17.4.4 '@gkd-kit/selector': specifier: 0.0.14 version: 0.0.14