- Notifications
You must be signed in to change notification settings - Fork280
Hosts TSConfigs to extend in a TypeScript app, tuned to a particular runtime environment
License
tsconfig/bases
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
Recommendedtsconfig.json
Install:
npm install --save-dev @tsconfig/recommendedyarn add --dev @tsconfig/recommended
Add to yourtsconfig.json:
"extends":"@tsconfig/recommended/tsconfig.json"
Install:
npm install --save-dev @tsconfig/bunyarn add --dev @tsconfig/bun
Add to yourtsconfig.json:
"extends":"@tsconfig/bun/tsconfig.json"
Create React Apptsconfig.json
Install:
npm install --save-dev @tsconfig/create-react-appyarn add --dev @tsconfig/create-react-app
Add to yourtsconfig.json:
"extends":"@tsconfig/create-react-app/tsconfig.json"
Cypresstsconfig.json
Install:
npm install --save-dev @tsconfig/cypressyarn add --dev @tsconfig/cypress
Add to yourtsconfig.json:
"extends":"@tsconfig/cypress/tsconfig.json"
Denotsconfig.json
Install:
npm install --save-dev @tsconfig/denoyarn add --dev @tsconfig/deno
Add to yourtsconfig.json:
"extends":"@tsconfig/deno/tsconfig.json"
Docusaurus v2tsconfig.json
Install:
npm install --save-dev @tsconfig/docusaurusyarn add --dev @tsconfig/docusaurus
Add to yourtsconfig.json:
"extends":"@tsconfig/docusaurus/tsconfig.json"
NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
Embertsconfig.json
Install:
npm install --save-dev @tsconfig/emberyarn add --dev @tsconfig/ember
Add to yourtsconfig.json:
"extends":"@tsconfig/ember/tsconfig.json"
NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
Next.jstsconfig.json
Install:
npm install --save-dev @tsconfig/nextyarn add --dev @tsconfig/next
Add to yourtsconfig.json:
"extends":"@tsconfig/next/tsconfig.json"
Node LTS (24)tsconfig.json
Install:
npm install --save-dev @tsconfig/node-ltsyarn add --dev @tsconfig/node-lts
Add to yourtsconfig.json:
"extends":"@tsconfig/node-lts/tsconfig.json"
Node with TypeScript (TS >=5.8 ONLY)tsconfig.json
Install:
npm install --save-dev @tsconfig/node-tsyarn add --dev @tsconfig/node-ts
This base require TypeScript 5.8+ (Seeannouncement)
This file is meant to be used in conjunction with other Node.js configurations, you can do so by extending multiple files in theextends clause of yourtsconfig.json:
{"extends": ["@tsconfig/node22/tsconfig.json","@tsconfig/node-ts/tsconfig.json"]}Node 10tsconfig.json
Install:
npm install --save-dev @tsconfig/node10yarn add --dev @tsconfig/node10
Add to yourtsconfig.json:
"extends":"@tsconfig/node10/tsconfig.json"
Node 12tsconfig.json
Install:
npm install --save-dev @tsconfig/node12yarn add --dev @tsconfig/node12
Add to yourtsconfig.json:
"extends":"@tsconfig/node12/tsconfig.json"
Node 14tsconfig.json
Install:
npm install --save-dev @tsconfig/node14yarn add --dev @tsconfig/node14
Add to yourtsconfig.json:
"extends":"@tsconfig/node14/tsconfig.json"
Node 16tsconfig.json
Install:
npm install --save-dev @tsconfig/node16yarn add --dev @tsconfig/node16
Add to yourtsconfig.json:
"extends":"@tsconfig/node16/tsconfig.json"
Node 17tsconfig.json
Install:
npm install --save-dev @tsconfig/node17yarn add --dev @tsconfig/node17
Add to yourtsconfig.json:
"extends":"@tsconfig/node17/tsconfig.json"
Node 18tsconfig.json
Install:
npm install --save-dev @tsconfig/node18yarn add --dev @tsconfig/node18
Add to yourtsconfig.json:
"extends":"@tsconfig/node18/tsconfig.json"
Node 19tsconfig.json
Install:
npm install --save-dev @tsconfig/node19yarn add --dev @tsconfig/node19
Add to yourtsconfig.json:
"extends":"@tsconfig/node19/tsconfig.json"
Node 20tsconfig.json
Install:
npm install --save-dev @tsconfig/node20yarn add --dev @tsconfig/node20
Add to yourtsconfig.json:
"extends":"@tsconfig/node20/tsconfig.json"
Node 21tsconfig.json
Install:
npm install --save-dev @tsconfig/node21yarn add --dev @tsconfig/node21
Add to yourtsconfig.json:
"extends":"@tsconfig/node21/tsconfig.json"
Node 22tsconfig.json
Install:
npm install --save-dev @tsconfig/node22yarn add --dev @tsconfig/node22
Add to yourtsconfig.json:
"extends":"@tsconfig/node22/tsconfig.json"
Node 23tsconfig.json
Install:
npm install --save-dev @tsconfig/node23yarn add --dev @tsconfig/node23
Add to yourtsconfig.json:
"extends":"@tsconfig/node23/tsconfig.json"
Node 24tsconfig.json
Install:
npm install --save-dev @tsconfig/node24yarn add --dev @tsconfig/node24
Add to yourtsconfig.json:
"extends":"@tsconfig/node24/tsconfig.json"
Nuxttsconfig.json
Install:
npm install --save-dev @tsconfig/nuxtyarn add --dev @tsconfig/nuxt
Add to yourtsconfig.json:
"extends":"@tsconfig/nuxt/tsconfig.json"
NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
QJSEnginetsconfig.json
Install:
npm install --save-dev @tsconfig/qjsengineyarn add --dev @tsconfig/qjsengine
Add to yourtsconfig.json:
"extends":"@tsconfig/qjsengine/tsconfig.json"
React Nativetsconfig.json
Install:
npm install --save-dev @tsconfig/react-nativeyarn add --dev @tsconfig/react-native
Add to yourtsconfig.json:
"extends":"@tsconfig/react-native/tsconfig.json"
Remixtsconfig.json
Install:
npm install --save-dev @tsconfig/remixyarn add --dev @tsconfig/remix
Add to yourtsconfig.json:
"extends":"@tsconfig/remix/tsconfig.json"
NOTE: You may need to add
"baseUrl": "."to yourtsconfig.jsonto support proper file resolution.
Strictesttsconfig.json
Install:
npm install --save-dev @tsconfig/strictestyarn add --dev @tsconfig/strictest
Add to yourtsconfig.json:
"extends":"@tsconfig/strictest/tsconfig.json"
Sveltetsconfig.json
Install:
npm install --save-dev @tsconfig/svelteyarn add --dev @tsconfig/svelte
Add to yourtsconfig.json:
"extends":"@tsconfig/svelte/tsconfig.json"
NOTE: After
@tsconfig/svelte@2.0.0, you should add/// <reference types="svelte" />to ad.tsor aindex.ts(entry) file to prevent typescript error.
Tarotsconfig.json
Install:
npm install --save-dev @tsconfig/taroyarn add --dev @tsconfig/taro
Add to yourtsconfig.json:
"extends":"@tsconfig/taro/tsconfig.json"
Vite Reacttsconfig.json
Install:
npm install --save-dev @tsconfig/vite-reactyarn add --dev @tsconfig/vite-react
Add to yourtsconfig.json:
"extends":"@tsconfig/vite-react/tsconfig.json"
Install:
npm install --save-dev @tsconfig/basesyarn add --dev @tsconfig/bases
Add to yourtsconfig.json:
// "extends": "@tsconfig/bases/<base>""extends":"@tsconfig/bases/node-lts"
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 theability toextend from multiple configs at once. For instance, if you wantto 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 viatsc --showConfig.
We deprecated it in favour of settingmodule/moduleResolution to node/bundler.
git clone https://github.com/tsconfig/bases.git tsconfig-basescd tsconfig-basesThen edit the tsconfig.json files inbases/.
Every morning there is a GitHub Action which deploys any changed bases.
To generate the recommended TSConfig which is generated viatsc --init, run:
deno run --allow-read --allow-run --allow-env --allow-write --allow-net scripts/generate-recommend.ts
Create a set of npm packages via:
deno run --allow-read --allow-write --allow-net scripts/create-npm-packages.ts
You can inspect them in thepackages/ 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.ts
The rest of the files in this repo are for deploying, which usesDeno 1.0.
If you add a new json file, please rundeno run --allow-read --allow-write scripts/update-markdown-readme.ts to update the README.
About
Hosts TSConfigs to extend in a TypeScript app, tuned to a particular runtime environment
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.