UNPKG

789 BMarkdownView Raw
1### A base TSConfig for working with Node 12.
2
3Add the package to your `"devDependencies"`:
4
5```sh
6npm install --save-dev @tsconfig/node12
7yarn add --dev @tsconfig/node12
8```
9
10Add to your `tsconfig.json`:
11
12```json
13"extends": "@tsconfig/node12/tsconfig.json"
14```
15
16---
17
18The `tsconfig.json`:
19
20```jsonc
21{
22 "$schema": "https://json.schemastore.org/tsconfig",
23 "display": "Node 12",
24
25 "compilerOptions": {
26 "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
27 "module": "commonjs",
28 "target": "es2019",
29
30 "strict": true,
31 "esModuleInterop": true,
32 "skipLibCheck": true,
33 "forceConsistentCasingInFileNames": true,
34 "moduleResolution": "node"
35 }
36}
37
38```
39
40You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node12.json).