From 6b0391bf2e216082116417bc5402a125db731433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?mac=C2=B7ufutx?= Date: Tue, 10 Jun 2025 16:17:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=BA=E5=88=B6=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=AC=A6=E5=90=88husky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/commit-msg | 4 ++++ commitlint.config.cjs | 1 + package.json | 2 ++ 3 files changed, 7 insertions(+) create mode 100755 .husky/commit-msg create mode 100644 commitlint.config.cjs diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..b567676 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx --no -- commitlint --edit "$1" diff --git a/commitlint.config.cjs b/commitlint.config.cjs new file mode 100644 index 0000000..422b194 --- /dev/null +++ b/commitlint.config.cjs @@ -0,0 +1 @@ +module.exports = { extends: ['@commitlint/config-conventional'] }; diff --git a/package.json b/package.json index 352a68c..b316283 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,8 @@ "vue-router": "^4.5.1" }, "devDependencies": { + "@commitlint/cli": "^19.8.1", + "@commitlint/config-conventional": "^19.8.1", "@types/node": "^20.19.0", "@typescript-eslint/eslint-plugin": "6.13.2", "@typescript-eslint/parser": "6.13.2",