tsconfig: Set module-related options.

Set `--esModuleInterop` and `--isolatedModules` for consistency with
Babel.  `tsc --init` adds `--esModuleInterop` by default.

Set `--moduleResolution node` so we can find type definitions in
modules that provide them.

Set `--forceConsistentCasingInFileNames`, which seems like a good
idea, and which `tsc --init` will add by default in TypeScript 3.7.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-10-29 16:25:26 -07:00 committed by Tim Abbott
parent 7a0a186e5f
commit 8654af367d
1 changed files with 4 additions and 0 deletions

View File

@ -10,11 +10,15 @@
"noEmit": true, "noEmit": true,
"target": "es5", "target": "es5",
"module": "es6", "module": "es6",
"esModuleInterop": true,
"moduleResolution": "node",
"sourceMap": true, "sourceMap": true,
/* Strict type-checking */ /* Strict type-checking */
"strict": true, "strict": true,
"strictNullChecks": false, "strictNullChecks": false,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
/* Additional checks */ /* Additional checks */
"noUnusedLocals": true, "noUnusedLocals": true,