From 2346f413690b8bd3df4b3f60c76b11abe7cf02b6 Mon Sep 17 00:00:00 2001 From: "WANGFAN\\wangf" <15871339963@163.com> Date: Thu, 5 Dec 2024 19:01:19 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=B5=8B=E8=AF=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/_/.gitignore | 2 +- commitlint.config.cjs | 46 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.husky/_/.gitignore b/.husky/_/.gitignore index 5e4debc..f59ec20 100644 --- a/.husky/_/.gitignore +++ b/.husky/_/.gitignore @@ -1 +1 @@ -* +* \ No newline at end of file diff --git a/commitlint.config.cjs b/commitlint.config.cjs index 207b59f..a2b619d 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -1,3 +1,47 @@ module.exports = { - extends: ["@commitlint/config-conventional"] + ignores: [commit => commit.includes("init")], + extends: ["@commitlint/config-conventional"], + rules: { + "body-leading-blank": [2, "always"], + "footer-leading-blank": [1, "always"], + "header-max-length": [2, "always", 108], + "subject-empty": [2, "never"], + "type-empty": [2, "never"], + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "style", + "perf", + "refactor", + "test", + "chore", + "docs", + "workflow", + "build", + "ci", + "revert", + "wip", + "release", + "deps" + // feat:新功能(feature) + // fix:修补bug + // style: 格式(不影响代码运行的变动) + // perf: 性能相关 + // refactor:重构(即不是新增功能,也不是修改bug的代码变动) + // test:测试 + // chore: 其他修改(不在上述类型中的修改) + // docs:文档(documentation) + // workflow: 工作流 + // build: 项目打包构建相关的配置修改 + // ci: 持续集成相关 + // revert: 恢复上一次提交(回滚) + // wip: work in progress 工作中 还没完成 + // release: 发版 + // deps: 依赖相关的修改 + ] + ] + } };