.agents/skills/commit-msg/references/format-and-examples.md
近期提交里常见这些写法:
fix(site): prevent duplicate API requests for doc contributorsfix(Splitter): set partially defined panel sizes correctlychore: bump @antfu/eslint-config to 7.7.0site: fix ThemePreview copy button in dark themedocs: fix parenthesis typo in Form.useWatch typeci: skip persist image-snapshots可以看出:
type(scope): subject,也有 scope: subjectsite 在 antd 中经常直接作为前缀使用| type | 适用场景 |
|---|---|
feat | 新功能 |
fix | 修 bug |
docs | 文档、说明、示例文字 |
refactor | 重构,不引入新功能,也不是修 bug |
test | 测试新增或调整 |
chore | 依赖、脚本、工程杂项 |
ci | CI 配置 |
site | 文档站、官网、展示层交互 |
Button、Table、Form、DatePickersite、scripts、docs、themecomponentsfix(Component)适用于组件行为修正,例如:
示例:
fix(Table): correct pagination when data is emptyfix(Form): preserve validate status after resetdocs适用于:
示例:
docs: update FAQ link in issue templatedocs(Button): clarify loading demo descriptionsite适用于文档站或官网层面的改动,例如:
示例:
site: add one-click copy theme code buttonsite: fix ThemePreview copy button in dark themechore适用于:
示例:
chore: bump @biomejs/biome from 2.4.5 to 2.4.6chore(scripts): update release helper暂存区同时包含多种小改动时,用更高层级的概括覆盖全部:
chore(components): clean up styles and typesdocs: update Button demo and READMEfix(Table): pagination and stylingsite: refine theme preview interactions输入:git diff --cached 显示只改了 components/button/demo/loading.md 里一段说明。
输出:docs(Button): update loading demo description
输入:暂存区包含 Table 的 type 修正、一处样式、一个 test 文件。
输出:fix(Table): adjust pagination types, styles and test
输入:仅改了一个脚本文件 scripts/xxx.js。
输出:chore(scripts): update xxx script
输入:首页主题预览和复制按钮一起调整。
输出:site: refine theme preview copy interactions