Files
tsl-devkit/docs/typescript/toolchain.md
T
csh 35e6a301aa 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
2026-03-04 15:56:21 +08:00

966 B
Raw Blame History

TypeScript/JavaScript 工具链

本 Playbook 推荐以下工具保证代码一致性与质量:

  • typescript:编译器(tsc
  • prettier:格式化
  • eslint:风格检查与静态分析(配合 @typescript-eslint
  • vitest / jest:测试(按项目选择)
  • tsx / ts-node:直接运行 .ts 文件(开发/脚本场景)
  • node:运行 .js/.mjs/.cjs 脚本

常用命令(示例)

安装工具(按项目实际包管理器调整):

pnpm add -D typescript prettier eslint typescript-eslint

类型检查:

tsc --noEmit

JavaScript 检查(可选,启用 allowJs + checkJs):

tsc --noEmit --allowJs --checkJs

格式化:

prettier --write .

Lint 检查:

eslint .

运行测试:

vitest run
# 或
jest --ci

包管理器

优先使用仓库已有的包管理器(pnpm / npm / yarn);未经沟通不切换。