forked from MetaMask/metamask-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
34 lines (34 loc) · 1.45 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
{
"compilerOptions": {
"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": [
"**/*.test.ts", // its pretty important to
"**/*.test.tsx", // use accurate types in
"**/*.stories.tsx", // tests and we don't
"**/*.stories.ts" // even come close.
],
// this should match our node version in .nvmrc
"extends": "@tsconfig/node20/tsconfig.json",
"include": ["app", "development", "shared", "types", "ui", "offscreen"]
}