-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtsconfig.json
More file actions
32 lines (32 loc) · 1.15 KB
/
Copy pathtsconfig.json
File metadata and controls
32 lines (32 loc) · 1.15 KB
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
{
"compilerOptions": {
"allowImportingTsExtensions": true,
"lib": ["DOM", "ESNext", "dom.iterable"],
"module": "ESNext",
"moduleResolution": "bundler",
"noEmit": true,
"skipLibCheck": true,
"strict": true,
"target": "ESNext",
// bin/ needs this. TypeScript 6 no longer loads @types/node on its own,
// and without it tsc reports 25 TS2591 errors there.
//
// It is deliberately over-broad. `types` applies to the whole project, so
// the Node globals also reach the browser code in assets/js/, where
// `process.env` type checks clean but throws a ReferenceError in a
// browser, and setTimeout gets Node's return type instead of number.
// `lib` leaks the same way in reverse: bin/ can reference `document`.
//
// Closing either hole means splitting this into a browser config
// (assets/js, DOM lib, no node types) and a Node config (bin, node types,
// no DOM), and pointing tsconfig.format-rawhtml.json and `lint:scripts`
// at the right one.
"types": ["node"]
},
"exclude": [
"node_modules",
"public",
".cache"
],
"include": ["./assets/js/**/*", "./bin/**/*.ts"]
}