Skip to content

代码规范

每个分类的细节见各专题文档:

  • 命名规范 — 文件 / 类 / 函数 / 路径 / 角色 / 按钮 / 路由名
  • Vue 书写风格 — SFC script 顺序、模板规则
  • 后端风格 — 强制约定清单(响应、Schema、API、CRUD、权限、模型)

工具链速览

工具命令
后端 lint / formatRuff(行宽 200,双引号,规则 E/F/I)just fmt backend / just lint backend
后端类型basedpyright(standard 模式)just typecheck backend
后端测试pytestjust test backend
前端 lintESLint(@soybeanjs/eslint-config-vue)+ oxlintjust lint frontend
前端类型vue-tscjust typecheck frontend
全栈一键just check
提交前钩子simple-git-hookscd web && pnpm install 自动安装

提交前必跑

bash
just check

只动了后端 / 前端时,可分别跑 just check backend / just check frontend

VS Code 推荐配置

基于 MIT 协议发布