ci: 添加 PR 提交规范检查和 commitlint

- 添加 commitlint 及 Conventional Commits 规范配置
- 添加 commit-msg husky hook 本地校验提交信息
- 添加 GitHub Actions PR 检查 workflow:
  - PR 标题符合 Conventional Commits
  - 所有 commit message 符合规范
  - ESLint + TypeScript 类型检查 + i18n 检查
This commit is contained in:
alger
2026-04-11 22:49:45 +08:00
parent f9222b699d
commit 4a50886a68
4 changed files with 86 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['feat', 'fix', 'perf', 'refactor', 'docs', 'style', 'test', 'build', 'ci', 'chore', 'revert']
],
'subject-empty': [2, 'never'],
'type-empty': [2, 'never']
}
};