File: README.md
Centralized Recommendations for TSConfig bases
Hosts TSConfigs for you to extend in your apps, tuned to a particular runtime environment. Owned and improved by the community.
Basically Definitely Typed for TSConfigs.
We target the latest stable version of TypeScript, note that because we want to be consistent with the versioning the target runtime we can't always do semver releases.
Table of TSConfigs
Available TSConfigs
Recommended [tsconfig.json](./bases/recommended.json)
Install:
npm install --save-dev @tsconfig/recommended
yarn add --dev @tsconfig/recommendedAdd to your tsconfig.json:
"extends": "@tsconfig/recommended/tsconfig.json"Bun [tsconfig.json](./bases/bun.json)
Install:
npm install --save-dev @tsconfig/bun
yarn add --dev @tsconfig/bunAdd to your tsconfig.json:
"extends": "@tsconfig/bun/tsconfig.json"Create React App [tsconfig.json](./bases/create-react-app.json)
Install:
npm install --save-dev @tsconfig/create-react-app
yarn add --dev @tsconfig/create-react-appAdd to your tsconfig.json:
"extends": "@tsconfig/create-react-app/tsconfig.json"Cypress [tsconfig.json](./bases/cypress.json)
Install:
npm install --save-dev @tsconfig/cypress
yarn add --dev @tsconfig/cypressAdd to your tsconfig.json:
"extends": "@tsconfig/cypress/tsconfig.json"Deno [tsconfig.json](./bases/deno.json)
Install:
npm install --save-dev @tsconfig/deno
yarn add --dev @tsconfig/denoAdd to your tsconfig.json:
"extends": "@tsconfig/deno/tsconfig.json"Docusaurus v2 [tsconfig.json](./bases/docusaurus.json)
Install:
npm install --save-dev @tsconfig/docusaurus
yarn add --dev @tsconfig/docusaurusAdd to your tsconfig.json:
"extends": "@tsconfig/docusaurus/tsconfig.json"NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
Ember [tsconfig.json](./bases/ember.json)
Install:
npm install --save-dev @tsconfig/ember
yarn add --dev @tsconfig/emberAdd to your tsconfig.json:
"extends": "@tsconfig/ember/tsconfig.json"NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
Next.js [tsconfig.json](./bases/next.json)
Install:
npm install --save-dev @tsconfig/next
yarn add --dev @tsconfig/nextAdd to your tsconfig.json:
"extends": "@tsconfig/next/tsconfig.json"Node LTS (24) [tsconfig.json](./bases/node-lts.json)
Install:
npm install --save-dev @tsconfig/node-lts
yarn add --dev @tsconfig/node-ltsAdd to your tsconfig.json:
"extends": "@tsconfig/node-lts/tsconfig.json"Node with TypeScript (TS >=5.8 ONLY) [tsconfig.json](./bases/node-ts.json)
Install:
npm install --save-dev @tsconfig/node-ts
yarn add --dev @tsconfig/node-tsThis base require TypeScript 5.8+ (See announcement)
This file is meant to be used in conjunction with other Node.js configurations, you can do so by extending multiple files in the extends clause of your tsconfig.json:
{
"extends": ["@tsconfig/node22/tsconfig.json", "@tsconfig/node-ts/tsconfig.json"]
}Node 10 [tsconfig.json](./bases/node10.json)
Install:
npm install --save-dev @tsconfig/node10
yarn add --dev @tsconfig/node10Add to your tsconfig.json:
"extends": "@tsconfig/node10/tsconfig.json"Node 12 [tsconfig.json](./bases/node12.json)
Install:
npm install --save-dev @tsconfig/node12
yarn add --dev @tsconfig/node12Add to your tsconfig.json:
"extends": "@tsconfig/node12/tsconfig.json"Node 14 [tsconfig.json](./bases/node14.json)
Install:
npm install --save-dev @tsconfig/node14
yarn add --dev @tsconfig/node14Add to your tsconfig.json:
"extends": "@tsconfig/node14/tsconfig.json"Node 16 [tsconfig.json](./bases/node16.json)
Install:
npm install --save-dev @tsconfig/node16
yarn add --dev @tsconfig/node16Add to your tsconfig.json:
"extends": "@tsconfig/node16/tsconfig.json"Node 17 [tsconfig.json](./bases/node17.json)
Install:
npm install --save-dev @tsconfig/node17
yarn add --dev @tsconfig/node17Add to your tsconfig.json:
"extends": "@tsconfig/node17/tsconfig.json"Node 18 [tsconfig.json](./bases/node18.json)
Install:
npm install --save-dev @tsconfig/node18
yarn add --dev @tsconfig/node18Add to your tsconfig.json:
"extends": "@tsconfig/node18/tsconfig.json"Node 19 [tsconfig.json](./bases/node19.json)
Install:
npm install --save-dev @tsconfig/node19
yarn add --dev @tsconfig/node19Add to your tsconfig.json:
"extends": "@tsconfig/node19/tsconfig.json"Node 20 [tsconfig.json](./bases/node20.json)
Install:
npm install --save-dev @tsconfig/node20
yarn add --dev @tsconfig/node20Add to your tsconfig.json:
"extends": "@tsconfig/node20/tsconfig.json"Node 21 [tsconfig.json](./bases/node21.json)
Install:
npm install --save-dev @tsconfig/node21
yarn add --dev @tsconfig/node21Add to your tsconfig.json:
"extends": "@tsconfig/node21/tsconfig.json"Node 22 [tsconfig.json](./bases/node22.json)
Install:
npm install --save-dev @tsconfig/node22
yarn add --dev @tsconfig/node22Add to your tsconfig.json:
"extends": "@tsconfig/node22/tsconfig.json"Node 23 [tsconfig.json](./bases/node23.json)
Install:
npm install --save-dev @tsconfig/node23
yarn add --dev @tsconfig/node23Add to your tsconfig.json:
"extends": "@tsconfig/node23/tsconfig.json"Node 24 [tsconfig.json](./bases/node24.json)
Install:
npm install --save-dev @tsconfig/node24
yarn add --dev @tsconfig/node24Add to your tsconfig.json:
"extends": "@tsconfig/node24/tsconfig.json"Node 26 [tsconfig.json](./bases/node26.json)
Install:
npm install --save-dev @tsconfig/node26
yarn add --dev @tsconfig/node26Add to your tsconfig.json:
"extends": "@tsconfig/node26/tsconfig.json"Nuxt [tsconfig.json](./bases/nuxt.json)
Install:
npm install --save-dev @tsconfig/nuxt
yarn add --dev @tsconfig/nuxtAdd to your tsconfig.json:
"extends": "@tsconfig/nuxt/tsconfig.json"NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
QJSEngine [tsconfig.json](./bases/qjsengine.json)
Install:
npm install --save-dev @tsconfig/qjsengine
yarn add --dev @tsconfig/qjsengineAdd to your tsconfig.json:
"extends": "@tsconfig/qjsengine/tsconfig.json"React Native [tsconfig.json](./bases/react-native.json)
Install:
npm install --save-dev @tsconfig/react-native
yarn add --dev @tsconfig/react-nativeAdd to your tsconfig.json:
"extends": "@tsconfig/react-native/tsconfig.json"Remix [tsconfig.json](./bases/remix.json)
Install:
npm install --save-dev @tsconfig/remix
yarn add --dev @tsconfig/remixAdd to your tsconfig.json:
"extends": "@tsconfig/remix/tsconfig.json"NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
Strictest [tsconfig.json](./bases/strictest.json)
Install:
npm install --save-dev @tsconfig/strictest
yarn add --dev @tsconfig/strictestAdd to your tsconfig.json:
"extends": "@tsconfig/strictest/tsconfig.json"Svelte [tsconfig.json](./bases/svelte.json)
Install:
npm install --save-dev @tsconfig/svelte
yarn add --dev @tsconfig/svelteAdd to your tsconfig.json:
"extends": "@tsconfig/svelte/tsconfig.json"NOTE: After
@tsconfig/[email protected], you should add/// <reference types="svelte" />to ad.tsor aindex.ts(entry) file to prevent typescript error.
Taro [tsconfig.json](./bases/taro.json)
Install:
npm install --save-dev @tsconfig/taro
yarn add --dev @tsconfig/taroAdd to your tsconfig.json:
"extends": "@tsconfig/taro/tsconfig.json"Vite React [tsconfig.json](./bases/vite-react.json)
Install:
npm install --save-dev @tsconfig/vite-react
yarn add --dev @tsconfig/vite-reactAdd to your tsconfig.json:
"extends": "@tsconfig/vite-react/tsconfig.json"Bases tsconfig.json
Install:
npm install --save-dev @tsconfig/bases
yarn add --dev @tsconfig/basesAdd to your tsconfig.json:
// "extends": "@tsconfig/bases/"
"extends": "@tsconfig/bases/node-lts"What about combined configs?
Because of previous limitations in the config extension system of TypeScript,
this repo used to provide combined configs from a few common bases (like Node + ESM,
Node + Strictest and so on).
This issue is now moot since TypeScript v5.0.0, which provides the ability to
extend from multiple configs at once. For instance, if you want
to start from a Node 18 + Strictest base config, you can install @tsconfig/bases (or both@tsconfig/node18 and @tsconfig/strictest) package and extend those configs like so:
// tsconfig.json
{
"extends": ["@tsconfig/bases/strictest", "@tsconfig/bases/node18"]
// or "extends": ["@tsconfig/strictest/tsconfig", "@tsconfig/node18/tsconfig"]
}You can see the result of the combined configs via tsc --showConfig.
What about `@tsconfig/esm`?
We deprecated it in favour of setting module/moduleResolution to node/bundler.
Contributing
git clone https://github.com/tsconfig/bases.git tsconfig-bases
cd tsconfig-basesThen edit the tsconfig.json files in bases/.
Every morning there is a GitHub Action which deploys any changed bases.
To generate the recommended TSConfig which is generated via tsc --init, run:
deno run --allow-read --allow-run --allow-env --allow-write --allow-net scripts/generate-recommend.tsDeveloping
Create a set of npm packages via:
deno run --allow-read --allow-write --allow-net scripts/create-npm-packages.tsYou can inspect them in the packages/ folder, then they are deployed by passing in the paths to the base files via stdin:
deno run --allow-read --allow-run --allow-env --allow-net scripts/deploy-changed-npm-packages.tsThe rest of the files in this repo are for deploying, which uses Deno 1.0.
If you add a new json file, please run deno run --allow-read --allow-write scripts/update-markdown-readme.ts to update the README.
File: template/README.md
[display_title].
Add the package to your "devDependencies":
npm install --save-dev @tsconfig/[filename]
yarn add --dev @tsconfig/[filename]Add to your tsconfig.json:
"extends": "@tsconfig/[filename]/tsconfig.json"[readme-extra]
The tsconfig.json:
[tsconfig]You can find the code here.