@batoanng/tsconfig
TypeScript presets for React apps, Next.js projects, Node runtimes, and legacy tooling edges.
Quick install
npm install -D @batoanng/tsconfigExtend 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.jsonto 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-configpackage now uses ESLint flat config withprojectService, so it no longer depends on this preset.
Surface
Exports And Entrypoints
Key files
.tsbuildinfobase.jsoneslint.jsonnextjs.jsonnode24.jsonpackage.jsonreactjs.json
🧱 Available Configs
| File | Purpose |
|---|---|
base.json | Core rules shared across all configs |
eslint.json | Optional TS parser preset for legacy ESLint setups |
nextjs.json | For Next.js frontend apps |
node24.json | For modern Node.js apps and libraries |
reactjs.json | For 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.
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.jsonto 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-configpackage now uses ESLint flat config withprojectService, so it no longer depends on this preset.
🧱 Available Configs
| File | Purpose |
|---|---|
base.json | Core rules shared across all configs |
eslint.json | Optional TS parser preset for legacy ESLint setups |
nextjs.json | For Next.js frontend apps |
node24.json | For modern Node.js apps and libraries |
reactjs.json | For 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"]
}