cursor-init/.cursor/rules/git-commit-rules.mdc
expressgy 5b0b37ef78 chore: 项目初始化相关配置与文档归档优化
- Prettier 配置迁移为 .prettierrc.cjs,解决 ESM/CJS 兼容问题
- 优化 package.json,补全元信息、整理依赖、完善 Bun 热更新脚本
- 归档项目初始化 PRD 与任务清单到 tasks/archive,并加日期前缀
- 同步代码风格与格式化配置,提升团队协作一致性

归档文件:tasks/archive/20240610-prd-项目初始化.md, tasks/archive/20240610-tasks-prd-项目初始化.md
2025-06-28 02:03:40 +08:00

55 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description:
globs:
alwaysApply: true
---
## Git 提交规范Commit Message Rules
1. **提交格式**
```
<type>(<scope>): <subject>
```
- `type`:提交类型(必填)
- `scope`:影响范围(可选)
- `subject`:简要描述(必填)
2. **type 类型**
- feat新功能
- fix修复 bug
- docs文档变更
- style代码格式不影响功能例如空格、分号等
- refactor代码重构既不是新增功能也不是修复 bug
- perf性能优化
- test增加或修改测试
- chore构建过程或辅助工具的变动
- revert回滚某个提交
3. **scope 范围**
- 用于说明 commit 影响的模块或文件(如 user、api、core 等),可省略。
4. **subject 描述**
- 简明扼要,建议不超过 50 字符
- 以动词开头,首字母小写
- 结尾不加句号
5. **正文body**
- 可选,详细描述本次提交的内容、动机、对比信息等
- 建议每行不超过 72 字符
6. **Footer**
- 可选,用于关联 issue 或进行破坏性变更说明
- 例如:`BREAKING CHANGE: xxx` 或 `Closes #123`
### 示例
```
feat(user): 新增用户登录功能
fix(api): 修复获取数据时的空指针异常
docs(readme): 更新安装说明
refactor(core): 优化数据处理逻辑
chore: 升级依赖包
```