chore: add husky + lint-staged + commitlint for commit quality control

This commit is contained in:
SpecialX
2026-07-07 20:17:15 +08:00
parent fb619139e5
commit 072c0d52b9
5 changed files with 1410 additions and 4 deletions

24
commitlint.config.mjs Normal file
View File

@@ -0,0 +1,24 @@
export default {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"test",
"chore",
"perf",
"ci",
"build",
"revert",
],
],
"subject-case": [0],
"header-max-length": [2, "always", 120],
},
}