Skip to content

代码规范

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

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

工具链速览

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

提交前必跑

bash
make check-all

只动了后端 / 前端时,可分别跑 make check / make web-check

VS Code 推荐配置

基于 MIT 协议发布