tsconfig.json Builder

Generate a TypeScript configuration for any project type or strictness level

Generate a tsconfig.json tuned for Node, React, or a publishable library — with the right target, module, moduleResolution, strict flags, paths, outDir, and declaration options for your project type.

What strict flags does the strict option enable?

Setting strict to true turns on a family of checks at once: strictNullChecks, strictFunctionTypes, strictBindCallApply, strictPropertyInitialization, noImplicitAny, noImplicitThis, useUnknownInCatchVariables, and alwaysStrict. It is the recommended baseline for new projects.

Generate a tsconfig.json that fits your project

tsconfig.json controls how the TypeScript compiler interprets and emits your code. The right settings differ sharply between a Node service, a React app compiled by a bundler, and a library you publish to npm. This builder asks what you are building and produces a sensible, modern configuration with the correct target, module, moduleResolution, strictness flags, and output options.

How it works

The output is a single compilerOptions object plus include/exclude arrays. The builder selects defaults by project type:

  • Node appmodule: "nodenext", moduleResolution: "nodenext", emit enabled to outDir.
  • React / bundlermodule: "esnext", moduleResolution: "bundler", jsx: "react-jsx", and noEmit: true because the bundler emits.
  • Library — emit enabled with declaration: true and declarationMap: true so consumers get type definitions and go-to-definition.

Strictness layers on top. A typical strict config looks like:

{
  "compilerOptions": {
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true
  }
}

Path aliases are written as a baseUrl plus a paths map. Remember the aliases must also be configured in your runtime or bundler — tsconfig only teaches the type-checker about them.

Tips and notes

  • Prefer strict: true on every new project; loosening individual flags later is easier than retrofitting strictness onto a large untyped codebase.
  • For bundler projects keep noEmit: true and let Vite/esbuild/webpack produce output, using tsc --noEmit purely as a type-check step in CI.
  • skipLibCheck: true speeds up builds by trusting third-party .d.ts files; it is widely used and safe in practice.
  • A published library should set declaration: true so downstream users get full IntelliSense.