Squashed 'docs/standards/playbook/' changes from 8b75747..c3f8137
c3f8137 📦 deps(skills): sync superpowers 35e827d 📦 deps(skills): sync superpowers e546ffb 📦 deps(skills): sync superpowers f7f2c57 🔧 chore(ci): use ci-bot identity for superpowers sync commits fa247a7 📦 deps(skills): sync superpowers a97c333 🔧 chore(ci): add resilient upstream fetch fallback for superpowers update 484f9d3 🔧 chore(ci): automate thirdparty superpowers refresh and sync base c19e53e 📝 docs(playbook): refresh guidance and examples 52046b4 📝 docs(prompts): add code-review template and align docs flow 9ac8a4c 📝 docs(typescript): clarify ts and js support boundaries 1f46203 ✨ feat(typescript): add standards docs and sync rewrite coverage 872c1af 🔧 feat(skills): install to agents home git-subtree-dir: docs/standards/playbook git-subtree-split: c3f81371e24d63b603de9b6eb92bf7e4c453a2b4
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# TypeScript/JavaScript 工具链
|
||||
|
||||
本 Playbook 推荐以下工具保证代码一致性与质量:
|
||||
|
||||
- `typescript`:编译器(`tsc`)
|
||||
- `prettier`:格式化
|
||||
- `eslint`:风格检查与静态分析(配合 `@typescript-eslint`)
|
||||
- `vitest` / `jest`:测试(按项目选择)
|
||||
- `tsx` / `ts-node`:直接运行 `.ts` 文件(开发/脚本场景)
|
||||
- `node`:运行 `.js/.mjs/.cjs` 脚本
|
||||
|
||||
## 常用命令(示例)
|
||||
|
||||
安装工具(按项目实际包管理器调整):
|
||||
|
||||
```bash
|
||||
pnpm add -D typescript prettier eslint typescript-eslint
|
||||
```
|
||||
|
||||
类型检查:
|
||||
|
||||
```bash
|
||||
tsc --noEmit
|
||||
```
|
||||
|
||||
JavaScript 检查(可选,启用 `allowJs` + `checkJs`):
|
||||
|
||||
```bash
|
||||
tsc --noEmit --allowJs --checkJs
|
||||
```
|
||||
|
||||
格式化:
|
||||
|
||||
```bash
|
||||
prettier --write .
|
||||
```
|
||||
|
||||
Lint 检查:
|
||||
|
||||
```bash
|
||||
eslint .
|
||||
```
|
||||
|
||||
运行测试:
|
||||
|
||||
```bash
|
||||
vitest run
|
||||
# 或
|
||||
jest --ci
|
||||
```
|
||||
|
||||
## 包管理器
|
||||
|
||||
优先使用仓库已有的包管理器(`pnpm` / `npm` / `yarn`);未经沟通不切换。
|
||||
Reference in New Issue
Block a user