@fellwork/tsconfig
v0.2.0
Published
Shared TypeScript configurations for Fellwork projects.
Maintainers
Readme
@fellwork/tsconfig
Shared TypeScript configurations for Fellwork projects.
Four small, composable presets that centralize strictness, security, and best-practice defaults across every Fellwork repo. Built on TS 5.5+ with ${configDir} template-variable support so library emit lands in the consuming package, not in node_modules.
Install
bun add -D -E @fellwork/tsconfig typescript@^5.5typescript >=5.5.0 is a required peer dependency (for ${configDir} template variable support).
Pick a preset
| Preset | When to use | What it sets |
|---|---|---|
| base | Generic TS, no environment assumptions | Strict + correctness flags, ES2022 target, ESNext/Bundler resolution, ES2023 lib (no DOM, no Node) |
| node | Bun/Node backend code, CLIs | extends base, switches to NodeNext/NodeNext, target ES2023 |
| browser | Frontend apps, isomorphic libs | extends base, adds DOM + DOM.Iterable libs |
| library | Anything you publish to npm (overlay only) | composite, declaration, declarationMap, sourceMap, ${configDir}/dist outDir |
extends: "@fellwork/tsconfig" (bare, without a subpath) silently resolves to base — prefer @fellwork/tsconfig/base to make the intent explicit.
Quick examples
Backend Node/Bun script
// tsconfig.json
{
"extends": "@fellwork/tsconfig/node",
"include": ["scripts/**/*.ts"]
}Publishable Node library
{
"extends": [
"@fellwork/tsconfig/node",
"@fellwork/tsconfig/library"
],
"include": ["src/**/*.ts"]
}Publishable browser/isomorphic library
{
"extends": [
"@fellwork/tsconfig/browser",
"@fellwork/tsconfig/library"
],
"include": ["src/**/*.ts"]
}Nuxt frontend
{
"extends": [
"./.nuxt/tsconfig.json",
"@fellwork/tsconfig/base"
]
}Order matters — Fellwork's strictness comes after Nuxt so it wins.
Composition rules
- Pick exactly one environment preset —
base,node, orbrowser. - Add
libraryonly if you need to emit.d.ts/ declaration maps / participate in project references. - Order matters in array
extends: later entries override earlier ones. Always putlibrarylast. - Don't extend
libraryalone — it has notarget/module/lib. Compose it with an env preset.
Documentation
- docs/usage.md — full preset reference (every option, why we set it)
- docs/composition.md — composition patterns and anti-patterns
- docs/migration.md — recipes for migrating existing Fellwork repos
- ../../docs/superpowers/specs/2026-04-26-fellwork-shared-configs-design.md — design doc
License
MIT © Shane McGuirt
