From 44c581dd44eef9f626759773059d1c0f6e08cc5e Mon Sep 17 00:00:00 2001 From: houakang Date: Fri, 10 Apr 2026 10:42:39 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=B0=86=20husky=20=E9=92=A9=E5=AD=90?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=20pnpm=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=20npm?= =?UTF-8?q?=20=E5=B9=B6=E6=9B=B4=E6=96=B0=20commitlint=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 husky 的 pre-commit 和 commit-msg 钩子中的包管理器从 pnpm 改为 npm,以统一使用 npm 执行脚本 --- commitlint.config.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/commitlint.config.js b/commitlint.config.js index 88d6ff0..bd5b5b3 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,21 +1,21 @@ -module.exports = { +export default { extends: ['@commitlint/config-conventional'], rules: { 'type-enum': [ 2, 'always', [ - 'feat', // 新功能 - 'fix', // 修复 bug - 'docs', // 文档变更 - 'style', // 代码格式(不影响代码运行的变动) + 'feat', // 新功能 + 'fix', // 修复 bug + 'docs', // 文档变更 + 'style', // 代码格式(不影响代码运行的变动) 'refactor', // 重构(既不是新增功能,也不是修改 bug 的代码变动) - 'perf', // 性能优化 - 'test', // 添加测试或修改现有测试 - 'chore', // 构建过程或辅助工具的变动 - 'ci', // CI 配置文件和脚本的变动 - 'build', // 影响构建系统或外部依赖的更改 - 'revert', // 回滚提交 + 'perf', // 性能优化 + 'test', // 添加测试或修改现有测试 + 'chore', // 构建过程或辅助工具的变动 + 'ci', // CI 配置文件和脚本的变动 + 'build', // 影响构建系统或外部依赖的更改 + 'revert', // 回滚提交 ], ], 'type-case': [2, 'always', 'lower-case'], @@ -24,4 +24,4 @@ module.exports = { 'subject-full-stop': [2, 'never', '.'], 'header-max-length': [2, 'always', 100], }, -}; +}