Shared TypeScript configs for acamarata packages (4 variants)
Find a file
2026-05-29 20:06:58 -04:00
.github/workflows ci(tsconfig): enable corepack before setup-node 2026-05-29 20:06:58 -04:00
scripts chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
.gitignore chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
.npmrc chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
CHANGELOG.md chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
LICENSE chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
package.json chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
pnpm-lock.yaml ci(tsconfig): enable corepack before setup-node 2026-05-29 20:06:58 -04:00
README.md chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
tsconfig.base.json chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
tsconfig.library.json chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
tsconfig.node.json chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00
tsconfig.react.json chore: scaffold @acamarata/tsconfig 0.1.0 2026-05-28 12:30:48 -04:00

@acamarata/tsconfig

Shared TypeScript configs for acamarata packages. Four variants covering the common cases: a strict base, a publishable library, a Node.js tool, and a React app.

Install

pnpm add -D @acamarata/tsconfig

Variants

Config Extends Use case
tsconfig.base.json Strict base. All other variants extend this. Use it directly only if none of the others fit.
tsconfig.library.json base Publishable npm libraries. ESNext modules, declaration: true, declarationMap: true, sourceMap: true.
tsconfig.node.json base Node.js tools and scripts. CommonJS output, @types/node included.
tsconfig.react.json base React apps. Adds jsx: react-jsx and the DOM lib.

Usage

In your tsconfig.json, set extends to the variant that matches your project:

{
  "extends": "@acamarata/tsconfig/tsconfig.library.json",
  "compilerOptions": {
    "rootDir": "src"
  },
  "include": ["src"]
}

For a Node.js CLI tool:

{
  "extends": "@acamarata/tsconfig/tsconfig.node.json",
  "compilerOptions": {
    "rootDir": "src"
  },
  "include": ["src"]
}

For a React app:

{
  "extends": "@acamarata/tsconfig/tsconfig.react.json",
  "include": ["src"]
}

What the base config enables

  • strict: true — the full strict family of checks
  • skipLibCheck: true — skips checking declaration files in node_modules
  • noUncheckedIndexedAccess: true — array index access includes undefined in the type
  • exactOptionalPropertyTypes: true — distinguishes { x?: string } from { x: string | undefined }
  • target: ES2022 — modern output; no polyfill overhead for async/await, class fields, at()
  • moduleResolution: bundler — resolves .ts extensions naturally in bundler pipelines (tsup, Vite, esbuild)

License

MIT