Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tsconfig/bases
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 67905a42004f7067b78c41a8b1a8311d3164fd3c
Choose a base ref
...
head repository: tsconfig/bases
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 031273b815ff7f672c7c9057fb7d19ef363054b1
Choose a head ref

Commits on Apr 21, 2023

  1. Copy the full SHA
    9a2d72d View commit details
  2. Copy the full SHA
    14dcd67 View commit details
  3. Merge pull request #176 from RobinTail/node19-base

    Node19 base
    orta authored Apr 21, 2023
    1
    Copy the full SHA
    3b80405 View commit details
  4. Copy the full SHA
    9627b56 View commit details
  5. Copy the full SHA
    8f3f1bc View commit details
  6. Merge pull request #177 from steffen-4s1/patch-1

    Add "tsc --showConfig" command to combine section in readme
    orta authored Apr 21, 2023
    1
    Copy the full SHA
    41a0841 View commit details

Commits on Apr 22, 2023

  1. Merge pull request #178 from RobinTail/node19-v2

    Node 19 base v2
    orta authored Apr 22, 2023
    1
    Copy the full SHA
    84f3d68 View commit details

Commits on May 2, 2023

  1. Copy the full SHA
    630f30e View commit details

Commits on May 5, 2023

  1. Merge pull request #181 from tri-star/update-nuxt-config

    Update nuxt.json: Add .nuxt, dist to "exclude" to match create-nuxt-app.
    orta authored May 5, 2023
    1
    Copy the full SHA
    08f67df View commit details

Commits on May 9, 2023

  1. Copy the full SHA
    97103a0 View commit details
  2. Update vite-react.json

    orta authored May 9, 2023
    Copy the full SHA
    63b78fd View commit details
  3. Merge pull request #186 from MatthijsKok/main

    Use `moduleResolution: bundler` for Vite React
    orta authored May 9, 2023
    1
    Copy the full SHA
    b819caf View commit details
  4. Copy the full SHA
    47d3c29 View commit details

Commits on May 10, 2023

  1. [react-native] moduleResolution: "nodenext".

    This lets TypeScript do ESM style resolution with export maps.
    
    It requires TS 4.7, but our template has shipped with 4.8, so it's probably fine to let the repo do it's normal patch bump?
    
    When we can target 5.0 we should maybe consider changing it to `moduleResolution: "bundler"`.
    NickGerleman authored May 10, 2023
    5
    Copy the full SHA
    e2fbea2 View commit details
  2. Copy the full SHA
    5b4e858 View commit details
  3. Merge pull request #188 from tsconfig/NickGerleman-rn-export-maps

    [react-native] `moduleResolution: "nodenext"`
    NickGerleman authored May 10, 2023
    1
    Copy the full SHA
    3bdac9b View commit details

Commits on May 11, 2023

  1. Merge pull request #187 from TatsuyaYamamoto/module-node16

    Use `module: node16` for Node.js 16+
    orta authored May 11, 2023
    1
    Copy the full SHA
    4c413cf View commit details

Commits on May 17, 2023

  1. Move back to "moduleResolution: node"

    We probably don't want this in 0.72 yet, since Metro won't work with this by default yet, and `moduleResolution: bundler` is better and slated to come to 0.73.
    NickGerleman authored May 17, 2023
    Copy the full SHA
    ff22f83 View commit details
  2. Merge pull request #193 from tsconfig/NickGerleman-revert-moduleresol…

    …ution
    
    Move back to "moduleResolution: node"
    NickGerleman authored May 17, 2023
    1
    Copy the full SHA
    c02bced View commit details

Commits on May 18, 2023

  1. Copy the full SHA
    a01d37e View commit details

Commits on May 19, 2023

  1. Major version bump

    probablykasper authored May 19, 2023
    Copy the full SHA
    8bb4651 View commit details

Commits on Jun 21, 2023

  1. Copy the full SHA
    a8c454f View commit details
  2. bundler needs nodenext

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    449f1c9 View commit details
  3. Update node12

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    b1eae8c View commit details
  4. bundler needs esnext

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    700981c View commit details
  5. Delist esm.json

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    7f15ea0 View commit details

Commits on Jun 22, 2023

  1. Bump some versions

    orta committed Jun 22, 2023
    Copy the full SHA
    7301ec5 View commit details

Commits on Jun 27, 2023

  1. Copy the full SHA
    4fd7c96 View commit details
  2. Major semver to all of them

    orta committed Jun 27, 2023
    Copy the full SHA
    f2fd2b6 View commit details
  3. Merge pull request #197 from andrewbranch/update-module-resolution

    Update module and moduleResolution to stop using node and invalid combintations
    orta authored Jun 27, 2023
    1
    Copy the full SHA
    014e892 View commit details

Commits on Jul 14, 2023

  1. Copy the full SHA
    82288b2 View commit details
  2. Merge pull request #205 from tsconfig/orta-patch-3

    Update node20.json to match the same semver as the other nodes
    orta authored Jul 14, 2023
    1
    Copy the full SHA
    53d80ed View commit details

Commits on Jul 16, 2023

  1. Update nuxt.json

    MrHBS authored Jul 16, 2023
    Copy the full SHA
    e0f1f4c View commit details

Commits on Jul 28, 2023

  1. add bun tsconfig base

    gillesdemey committed Jul 28, 2023
    Copy the full SHA
    54a47a9 View commit details
  2. update README

    gillesdemey committed Jul 28, 2023
    Copy the full SHA
    99655ae View commit details

Commits on Aug 20, 2023

  1. Copy the full SHA
    d73fed1 View commit details

Commits on Aug 21, 2023

  1. Merge pull request #210 from umairraza96/fix/inconsistent-module

    fix:  inconsistent case for "module" field in node bases #209
    orta authored Aug 21, 2023
    1
    Copy the full SHA
    5b6eb1d View commit details
  2. Merge pull request #208 from gillesdemey/bases/bun

    add bun tsconfig base
    orta authored Aug 21, 2023
    1
    Copy the full SHA
    2ab15f2 View commit details
  3. Merge pull request #206 from MrHBS/patch-1

    Update nuxt.json
    orta authored Aug 21, 2023
    1
    Copy the full SHA
    b3abe0c View commit details
  4. Merge pull request #195 from probablykasper/patch-1

    Enable strict mode for svelte.json
    orta authored Aug 21, 2023
    1
    Copy the full SHA
    5ee68ff View commit details

Commits on Aug 24, 2023

  1. Enable isolatedModules on bases/strictest.json

    Signed-off-by: Sora Morimoto <sora@morimoto.io>
    smorimoto committed Aug 24, 2023
    Copy the full SHA
    081c7a2 View commit details

Commits on Aug 29, 2023

  1. Merge pull request #214 from smorimoto/strictest-isolated-modules

    Enable `isolatedModules` on `bases/strictest.json`
    orta authored Aug 29, 2023
    1
    Copy the full SHA
    031273b View commit details
50 changes: 36 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
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 versions 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.

### Available TSConfigs

<!-- AUTO -->
@@ -20,6 +22,20 @@ Add to your `tsconfig.json`:
```json
"extends": "@tsconfig/recommended/tsconfig.json"
```
### Bun <kbd><a href="./bases/bun.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/bun
yarn add --dev @tsconfig/bun
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/bun/tsconfig.json"
```
### Create React App <kbd><a href="./bases/create-react-app.json">tsconfig.json</a></kbd>

Install:
@@ -90,20 +106,6 @@ Add to your `tsconfig.json`:
```json
"extends": "@tsconfig/ember/tsconfig.json"
```
### ESM <kbd><a href="./bases/esm.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/esm
yarn add --dev @tsconfig/esm
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/esm/tsconfig.json"
```
### Next.js <kbd><a href="./bases/next.json">tsconfig.json</a></kbd>

Install:
@@ -216,6 +218,20 @@ Add to your `tsconfig.json`:
```json
"extends": "@tsconfig/node18/tsconfig.json"
```
### Node 19 <kbd><a href="./bases/node19.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/node19
yarn add --dev @tsconfig/node19
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/node19/tsconfig.json"
```
### Node 20 <kbd><a href="./bases/node20.json">tsconfig.json</a></kbd>

Install:
@@ -351,6 +367,12 @@ to start from a Node 18 + Strictest base config, you can install both
}
```

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](https://github.com/tsconfig/bases/pull/197) to node/bundler.

### Contributing

```sh
34 changes: 34 additions & 0 deletions bases/bun.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
// This is based on https://bun.sh/docs/runtime/typescript#recommended-compileroptions
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Bun",
"docs": "https://bun.sh/docs/runtime/typescript",

"compilerOptions": {
// add Bun type definitions
"types": [
"bun-types"
],

// enable latest features
"lib": [
"ESNext"
],
"module": "ESNext",
"target": "ESNext",

// if TS 5.x+
"moduleResolution": "bundler",
"noEmit": true,
"allowImportingTsExtensions": true,
"moduleDetection": "force",

// support JSX
"jsx": "react-jsx",

// best practices
"strict": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
}
}
4 changes: 2 additions & 2 deletions bases/create-react-app.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Create React App",

"_version": "2.0.0",

"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"moduleResolution": "bundler",
"target": "es2015",

"allowJs": true,
@@ -14,7 +15,6 @@
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
4 changes: 3 additions & 1 deletion bases/docusaurus.json
Original file line number Diff line number Diff line change
@@ -2,13 +2,15 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Docusaurus v2",
"docs": "https://v2.docusaurus.io/docs/typescript-support",
"_version": "2.0.0",

"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"jsx": "react",
"lib": ["DOM"],
"moduleResolution": "Node16",
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
"types": ["node", "@docusaurus/module-type-aliases", "@docusaurus/theme-classic"],
"baseUrl": ".",
6 changes: 3 additions & 3 deletions bases/ember.json
Original file line number Diff line number Diff line change
@@ -2,15 +2,15 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Ember",
"docs": "https://docs.ember-cli-typescript.com",
"_version": "2.0.0",
"_version": "3.0.0",

// This is the base config used by Ember apps and addons. When actually used
// via Ember CLI (e.g. ember-cli-typescript's blueprint), it additionally has
// `compilerOptions.baseUrl`, `compilerOptions.paths`, and `include` set.
"compilerOptions": {
"target": "ES2021",
"module": "ES2020",
"moduleResolution": "node",
"module": "esnext",
"moduleResolution": "bundler",

// Trying to check Ember apps and addons with `allowJs: true` is a recipe
// for many unresolveable type errors, because with *considerable* extra
2 changes: 2 additions & 0 deletions bases/esm.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"_deprecated": true,
"$schema": "https://json.schemastore.org/tsconfig",
"display": "ESM",

"compilerOptions": {
"module": "es2022",
"moduleResolution": "bundler",

"verbatimModuleSyntax": true
}
5 changes: 3 additions & 2 deletions bases/next.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"_version": "2.0.0",

"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
@@ -11,7 +12,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
12 changes: 5 additions & 7 deletions bases/node-lts.json
Original file line number Diff line number Diff line change
@@ -3,17 +3,15 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node LTS",
"_version": "18.12.1",
"_version": "18.1.0",
"compilerOptions": {
"lib": [
"es2022"
],
"module": "commonjs",
"lib": ["es2023"],
"module": "node16",
"target": "es2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
}
5 changes: 3 additions & 2 deletions bases/node12.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 12",
"_version": "12.1.0",

"compilerOptions": {
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
"module": "commonjs",
"module": "node16",
"target": "es2019",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
5 changes: 3 additions & 2 deletions bases/node14.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 14",
"_version": "14.1.0",

"compilerOptions": {
"lib": ["es2020"],
"module": "commonjs",
"module": "node16",
"target": "es2020",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
5 changes: 3 additions & 2 deletions bases/node16.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 16",
"_version": "16.1.0",

"compilerOptions": {
"lib": ["es2021"],
"module": "commonjs",
"module": "node16",
"target": "es2021",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
6 changes: 3 additions & 3 deletions bases/node17.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 17",

"_version": "17.1.0",
"compilerOptions": {
"lib": ["es2022"],
"module": "commonjs",
"module": "node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
6 changes: 3 additions & 3 deletions bases/node18.json
Original file line number Diff line number Diff line change
@@ -2,17 +2,17 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 18",

"_version": "2.0.0",
"_version": "18.2.0",

"compilerOptions": {
"lib": ["es2023"],
"module": "commonjs",
"module": "node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
18 changes: 18 additions & 0 deletions bases/node19.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 19",

"_version": "19.1.0",

"compilerOptions": {
"lib": ["es2023"],
"module": "Node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node16"
}
}
5 changes: 3 additions & 2 deletions bases/node20.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 20",
"_version": "20.1.0",

"compilerOptions": {
"lib": ["es2023"],
"module": "commonjs",
"module": "node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
Loading