Repository navigation
Expand file tree
/
Copy pathtsconfig.scripts.json
More file actions
38 lines (38 loc) · 1.78 KB
/
Copy pathtsconfig.scripts.json
File metadata and controls
38 lines (38 loc) · 1.78 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
33
34
35
36
37
38
// Typecheck project for scripts/, EXCEPT the browser harnesses.
//
// Everything here runs under Bun on a terminal: migrations, backfills, puzzle
// tooling, the test runner itself. So it inherits the server project's
// settings, DOM deliberately EXCLUDED - a reference to `document` in a
// migration script is a bug, and leaving DOM out is what makes it one.
//
// scripts/browser-harness/ is the exception and has its own project,
// tsconfig.harness.json, because those files DO write browser code. DOM cannot
// simply be widened into this project to cover them: with lib.dom loaded, the
// DOM's ReadableStream shadows Bun's, and `for await (const chunk of
// proc.stderr)` in bgs-engine-probe.ts fails TS2504 because the DOM type
// declares no [Symbol.asyncIterator]. Measured 2026-08-09: no DOM here plus DOM
// there is 0 errors; one project with DOM for everything is 1, and the only way
// to silence it is a cast at a line that is already correct.
//
// deep-wallwars/scripts/ is in this project too: its .ts files are the same
// kind of terminal Bun tooling (puzzle builders, training-state generators, the
// head-to-head benchmark, the policy-Elo window). Before 2026-10-31 they were in
// no project at all, so nothing type-checked them.
//
// scripts/**/*.mjs is not listed. Those are plain-JS harnesses with no types
// to check; eslint covers them for syntax and unused bindings.
//
// Read by two things, which must stay in step: `bun run typecheck`, and the
// type-aware ESLint rules in eslint.config.js.
{
"extends": "./tsconfig.server.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.scripts.tsbuildinfo"
},
"include": [
"scripts/**/*.ts",
"scripts/**/*.mts",
"deep-wallwars/scripts/**/*.ts"
],
"exclude": ["scripts/browser-harness/**"]
}