All packages/@batoanng/tsconfig
Config

@batoanng/tsconfig

TypeScript presets for React apps, Next.js projects, Node runtimes, and legacy tooling edges.

Version 1.5.11 min read

Quick install

npm install -D @batoanng/tsconfig

Extend the React preset

Choose the preset that matches the runtime and only override the options that are genuinely project-specific.

Context

What It Covers

Pick a preset, extend it from your local tsconfig.json, and keep compiler defaults aligned across the monorepo.

  • Strict type checking across all environments
  • Modern module and target settings
  • Multiple environment presets:
  • Built in base.json to centralize core rules

✨ Features

  • Strict type-checking across all environments
  • Modern module and target settings
  • Multiple environment presets:
    • Node.js (v24+)
    • React apps and libraries
    • Next.js projects
    • Optional tooling support for legacy ESLint TypeScript parser setups
  • Built-in base.json to centralize core rules
  • Easy to extend across packages and apps

Setup

Installation

Bring the package into your project with the published npm entrypoint.

npm install -D @batoanng/tsconfig

📦 Installation

npm install -D @batoanng/tsconfig typescript

Start

Extend the React preset

Choose the preset that matches the runtime and only override the options that are genuinely project-specific.

{
  "extends": "@batoanng/tsconfig/reactjs.json",
  "compilerOptions": {
    "outDir": "dist"
  }
}

🚀 Usage

In your tsconfig.json, extend the desired preset:

For a React app or component library

{
  "extends": "@batoanng/tsconfig/reactjs.json"
}

For a Next.js app

{
  "extends": "@batoanng/tsconfig/nextjs.json"
}

For Node.js (v24+)

{
  "extends": "@batoanng/tsconfig/node24.json"
}

For legacy ESLint parser projects only

{
  "extends": "@batoanng/tsconfig/eslint.json"
}

The shared @batoanng/eslint-config package now uses ESLint flat config with projectService, so it no longer depends on this preset.


Surface

Exports And Entrypoints

Key files

  • .tsbuildinfo
  • base.json
  • eslint.json
  • nextjs.json
  • node24.json
  • package.json
  • reactjs.json

🧱 Available Configs

FilePurpose
base.jsonCore rules shared across all configs
eslint.jsonOptional TS parser preset for legacy ESLint setups
nextjs.jsonFor Next.js frontend apps
node24.jsonFor modern Node.js apps and libraries
reactjs.jsonFor React-based apps and libraries

Ops

Development Notes

Latest release snapshot

1.5.1

Patch Changes

  • Minimize package size

🔒 Strictness & Quality

All presets inherit from base.json which includes:

{
  "compilerOptions": {
    "composite": false,
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "inlineSources": false,
    "isolatedModules": true,
    "moduleResolution": "node",
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "preserveWatchOutput": true,
    "skipLibCheck": true,
    "strict": true
  },
  "exclude": ["node_modules"]
}

Source docs

Reference

The full README is rendered below so the package guide stays detailed and traceable to the source docs that live with the package itself.

npm version install size

A set of shareable TypeScript configuration presets designed for consistency across Node.js, React, Next.js, and tooling within a monorepo.


✨ Features

  • Strict type-checking across all environments
  • Modern module and target settings
  • Multiple environment presets:
    • Node.js (v24+)
    • React apps and libraries
    • Next.js projects
    • Optional tooling support for legacy ESLint TypeScript parser setups
  • Built-in base.json to centralize core rules
  • Easy to extend across packages and apps

📦 Installation

npm install -D @batoanng/tsconfig typescript

🚀 Usage

In your tsconfig.json, extend the desired preset:

For a React app or component library

{
  "extends": "@batoanng/tsconfig/reactjs.json"
}

For a Next.js app

{
  "extends": "@batoanng/tsconfig/nextjs.json"
}

For Node.js (v24+)

{
  "extends": "@batoanng/tsconfig/node24.json"
}

For legacy ESLint parser projects only

{
  "extends": "@batoanng/tsconfig/eslint.json"
}

The shared @batoanng/eslint-config package now uses ESLint flat config with projectService, so it no longer depends on this preset.


🧱 Available Configs

FilePurpose
base.jsonCore rules shared across all configs
eslint.jsonOptional TS parser preset for legacy ESLint setups
nextjs.jsonFor Next.js frontend apps
node24.jsonFor modern Node.js apps and libraries
reactjs.jsonFor React-based apps and libraries

🛠 Example tsconfig.json

{
  "extends": "@batoanng/tsconfig/reactjs.json",
  "compilerOptions": {
    "outDir": "dist",
    "rootDir": "src"
  },
  "include": ["src"],
  "exclude": ["dist", "node_modules"]
}

🔒 Strictness & Quality

All presets inherit from base.json which includes:

{
  "compilerOptions": {
    "composite": false,
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "inlineSources": false,
    "isolatedModules": true,
    "moduleResolution": "node",
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "preserveWatchOutput": true,
    "skipLibCheck": true,
    "strict": true
  },
  "exclude": ["node_modules"]
}