-
Notifications
You must be signed in to change notification settings - Fork 2
/
tsconfig.json
50 lines (45 loc) · 1.75 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
45
46
47
48
49
50
{
"compilerOptions": {
"target": "ES2015",
"allowJs": true,
"checkJs": false,
/*
`noEmit` by default to prevent accidentally emitting in leaf projects i.e. clients and apps.
Internal projects must override this setting to emit declarations. The compilerOptions they
must add are:
```
"composite": true, // Allows them to be `references` in other projects
"noEmit": false, // Allows them to emit declarations
"emitDeclarationOnly": true, // Prevent them from emitting JS
"declarationDir": "types" // Emit the declarations into a separate directory that we can
gitignore
```
Additionally they must declare their `includes`. See
https://www.typescriptlang.org/docs/handbook/project-references.html#composite for details.
The leaf projects then declar `references` to the internal projects they depend on like:
```
"references": [{"path": "../howdju-common"}]
```
This avoids typechecking the internal projects twice. Specifically, it prevents an error where
the leaf project does not recognize the `@` path for project-relative imports for the
internal projects.
*/
"noEmit": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true, // Prevents internal @types/node conflicts like in #60
"resolveJsonModule": true
},
"exclude": ["node_modules", "**/node_modules", "**/dist"]
}