Skip to content

Commit 6734082

Browse files
authored
CI: coderabbit review config (#34)
* CI: coderabbit review config
1 parent f5df986 commit 6734082

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.coderabbit.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# .coderabbit.yaml for Open Source Bazaar 项目
2+
3+
# -----------------
4+
# 核心设置
5+
# -----------------
6+
7+
# 设置 CodeRabbit 回复的语言 (e.g., "en", "zh-CN")
8+
language: "zh-CN"
9+
10+
# -----------------
11+
# 审查配置
12+
# -----------------
13+
14+
reviews:
15+
# 高级摘要配置
16+
high_level_summary: true
17+
high_level_summary_placeholder: "这是 Open Source Bazaar 项目的 PR 变更摘要"
18+
19+
# 路径过滤 - 排除 Next.js 项目中不需要审查的文件和目录
20+
path_filters:
21+
- "src/**"
22+
- "pages/**"
23+
- "components/**"
24+
- "models/**"
25+
- "!**/*.md"
26+
- "!**/*.{bin,csv}"
27+
- "!node_modules/**"
28+
- "!.next/**"
29+
- "!public/**/*.{png,jpg,jpeg,gif,webp,svg,ico,mp4,mp3,woff,woff2,ttf,otf}"
30+
- "!out/**"
31+
- "!next-env.d.ts"
32+
- "!package-lock.json"
33+
- "!pnpm-lock.yaml"
34+
- "!yarn.lock"
35+
- "!**/__snapshots__/**"
36+
37+
# 代码生成指令
38+
code_generation:
39+
docstrings:
40+
path_instructions:
41+
"pages/**": "确保所有用户界面文本使用 t() 函数进行国际化翻译"
42+
"components/**": "必须使用 React Bootstrap 组件替代自定义 HTML 元素"
43+
"models/**": "检查 MobX store 的正确使用,包括 @observer、@observable、@action、@computed"
44+
45+
# 全局语气指令
46+
tone_instructions: |
47+
使用专业中文语气。重点关注:1) 统一用 React Bootstrap;2) MobX
48+
observer/observable/action/computed 是否正确;3) 全部 UI 文本用 t();4) GitHub
49+
API 认证/错误处理与 Base64 统一用 web-utility;5) Pages Router 的数据获取正确;
50+
6) TypeScript 强类型;7) 性能(next/image、避免多余渲染);8) 结构清晰。

0 commit comments

Comments
 (0)