typescript-standards
Use when writing or configuring TypeScript at the LANGUAGE level (any framework) — tsconfig, pnpm, Biome, module/import hygiene, Vitest config, type patterns — in a touchstone repo. Triggers on .ts/.tsx, tsconfig.json, package.json. For framework rules use the framework skill (react/next/nuxt).
- License 许可
- MIT
- 最近更新
- 2026-08-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- typescript-standards
- license
- MIT
- metadata
- { "author": "touchstone", "version": "0.2.0" }
- description
- Use when writing or configuring TypeScript at the LANGUAGE level (any framework) — tsconfig, pnpm, Biome, module/import hygiene, Vitest config, type patterns — in a touchstone repo. Triggers on .ts/.tsx, tsconfig.json, package.json. For framework rules use the framework skill (react/next/nuxt).
03 SKILL.md 正文
TypeScript (language)
Full standard: standards/languages/typescript.md. For framework specifics see frameworks/.
Load-bearing rules:
Always
- pnpm only (pin
packageManager+ Corepack); commitpnpm-lock.yaml; CI--frozen-lockfile; keep lifecycle-script blocking on;pnpm audit. - Biome for lint+format (no ESLint/Prettier); enable
react/testdomains +a11y; CI runsbiome ci. - Strict
tsconfig+noUncheckedIndexedAccess,verbatimModuleSyntax,isolatedModules,moduleDetection: force.tsc --noEmitgreen in CI. - No
any—unknown+ narrowing, generics, or a schema.import typefor type-only.
Don't get burned
- Absolute imports; ban barrel files (
index.tsre-export hubs) — tree-shaking + cycle hazard. - Vitest with enforced coverage thresholds; mock the network (MSW), not
fetch. - Monorepo: pnpm workspaces +
workspace:*+ shared basetsconfig/biome.json.
Done
biome ci · tsc --noEmit · vitest (coverage ≥ floor) all green. See standards/languages/typescript.md.
04 同仓库更多 Skills
ok-standards
Use when writing shell, per standards/languages/shell.md.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.