-
Notifications
You must be signed in to change notification settings - Fork 5k
/
tsconfig.json
44 lines (44 loc) · 1.54 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"compilerOptions": {
// permit using ES6 imports for `*.ts` files via tsx/bun
"allowImportingTsExtensions": true,
"allowJs": true,
// ensures single-file compilers, like babel, webpack+swc, etc work
"isolatedModules": true,
// makes typechecking faster (also see `tsBuildInfoFile` setting)
"incremental": true,
"jsx": "react",
// todo: make two tsconfigs, one for node (development and test) and one for
// browser (app, ui, shared?) and ensure the code is split up into the right
// directories that make sense for their environment.
// I think this would eliminate a lot of eslint overrides complexity
// In the meantime, we need DOM libs and should target the ES version in
// "@tsconfig/node20/tsconfig.json" (`libs` here overwrites extends's `libs`)
"lib": ["DOM", "es2023"],
// we only use tsc for type checking (yarn lint:tsc)
"noEmit": true,
// matches webpack's `symlinks: false`
"preserveSymlinks": true,
"resolveJsonModule": true,
// sets output file location for the `incremental` setting
"tsBuildInfoFile": "node_modules/.cache/typescript/tsconfig.tsbuildinfo",
"useUnknownInCatchVariables": true
},
"exclude": [
// don't typecheck stories, as they don't yet pass the type checker.
"**/*.stories.tsx",
"**/*.stories.ts"
],
// this should match our node version in .nvmrc
"extends": "@tsconfig/node20/tsconfig.json",
"include": [
"app",
"development",
"offscreen",
"shared",
"test",
"types",
"ui",
"*.ts"
]
}