/dd:ts:toolingfrom dd:ts
Configures TypeScript projects using Bun as the sole toolchain: package manager, runtime, test runner, formatter, linter, and type checker. Covers bunfig.toml, tsconfig strictness, workspaces, and git hooks.
Ships in dd:ts. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Bun is the package manager, runtime, test runner, formatter, linter and type checker. No
prettier, no eslint, no tsc --noEmit, no jest.
| Job | Command | Replaces |
|---|---|---|
| install | bun install, bun add zod, bun add -d @types/bun | npm, yarn, pnpm |
| format | bun fmt | prettier |
| lint | bun lint | eslint + typescript-eslint |
| types | bun check | tsc --noEmit |
| test | bun test | jest, vitest |
bun fmt and bun lint fail with error: Script not found. Run bun upgrade, and pin a CI
image that has them.bun.lock is committed. Never a package-lock.json, yarn.lock or pnpm-lock.yaml
next to it.tsc stays only to emit .d.ts in a published package (dd:ts:library). bun check
only checks.package.json script with the same name wins over the built-in command. Do not add
fmt, lint or check scripts — call the commands directly.All tool config lives in bunfig.toml — [fmt] and [lint]. No .prettierrc, no
eslint.config.js. bun fmt does not read the prettier key in package.json.
List only the options that differ from the default. A config that restates defaults hides the few choices that matter.
[fmt]
semi = false
singleQuote = true
arrowParens = "avoid"
printWidth = 100
sortImports = true
[lint]
typeAware = true
maxWarnings = 0
[lint.rules]
"@typescript-eslint/no-explicit-any" = "error"
"@typescript-eslint/no-non-null-assertion" = "error"
"@typescript-eslint/consistent-type-definitions" = ["error", "type"]
"@typescript-eslint/consistent-type-imports" = "error"
"@typescript-eslint/no-floating-promises" = "error"
"@typescript-eslint/no-misused-promises" = "error"
"@typescript-eslint/no-unsafe-enum-comparison" = "error"
"no-console" = ["warn", { allow = ["warn", "error"] }]
bun fmtbun fmt --init writes the [fmt] section.sortImports = true orders the imports in groups — built-ins, packages, @/, relative —
with a blank line between them, and merges duplicate imports.semi = false — a line that starts with ( or [ gets a leading ;. The formatter adds
it.bun fmt --check — it writes nothing and exits 1 when a file needs formatting.bun lint[lint.rules] adds the rules
that carry the dd:ts:core conventions.typeAware = true turns on the rules that need types, such as no-floating-promises. It
type-checks first, so it is slower.maxWarnings = 0 — a warning fails the run.bun lint --print-config and confirm every rule is active.
no-unsafe-enum-comparison (it catches state === 'done') is not confirmed in Bun's docs —
check it with bun lint --explain @typescript-eslint/no-unsafe-enum-comparison.bun lint --fix applies safe fixes; --fix-suggestions also applies fixes that can change
behavior — review those.bun checktsconfig.json and reports the same errors as tsc.bun test --check type-checks, then runs the tests.{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"types": ["bun"],
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"verbatimModuleSyntax": true,
"isolatedModules": true,
"noEmit": true,
"skipLibCheck": true,
"paths": { "@/*": ["./src/*"] }
}
}
The flags that do the most work:
noUncheckedIndexedAccess — arr[i] is T | undefined. A silent undefined becomes a
compile error. It pairs with the ban on !.exactOptionalPropertyTypes — foo?: string no longer accepts an explicit undefined.
Do not assign undefined to an optional property; leave it out.verbatimModuleSyntax — makes import type mandatory.Never erasableSyntaxOnly. It bans enum (TS1294). The flag only matters when Node runs
.ts files in strip-only mode, which cannot compile an enum. Bun compiles enums itself.
A monorepo uses packages/*, declared in the root package.json:
"workspaces": ["packages/*"]
"@scope/fetcher": "workspace:*".tsconfig.json and adds
only its paths and include.The check is four commands, in this order — the cheap ones first:
bun fmt --check
bun lint
bun check
bun test
pre-commit: bun fmt --check and bun lint --staged.pre-push: bun check and bun test.--no-verify and
protects nothing.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub napalmpapalam/skills --plugin ts5 skills in this plugin
/coreThe TypeScript conventions that apply to almost every edit — code layout and blank lines, DRY, control flow, functions, types and enums, zod at boundaries, errors, async, module state, logging, classes, files and imports, comments, and naming. Use whenever writing, changing, or reviewing TypeScript, declaring types or enums, parsing external data, adding try/catch or error classes, writing async code, organizing files, barrels and imports, writing comments or TSDoc, refactoring code to be shorter, flatter or less repetitive, naming anything, or when the user asks about idiomatic TypeScript. This is the default TypeScript skill — load it first; reach for testing, tooling, or library on top of it when the task calls for them./libraryExtra TypeScript rules for a published package — the public API surface, package-prefixed names, private over/reviewComprehensive TypeScript code review — runs format, typecheck, lint and tests, loads the TypeScript convention skills, reviews the changes, and writes a structured report. Use when reviewing finished TypeScript changes, closing a slice that touched TypeScript, preparing a PR for merge, or auditing TypeScript code quality — not while writing the code./testingTypeScript testing with bun test — file layout, describe/test naming, arrange-act-assert, fixtures and mocks, asserting errors. Use whenever writing or reviewing TypeScript tests, setting up a test runner, organizing test files or fixtures, mocking dependencies, asserting on thrown errors, or when the user asks about test structure, coverage, or testing patterns in a TypeScript project.