-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtsconfig.scripts.json
More file actions
33 lines (33 loc) · 1.7 KB
/
Copy pathtsconfig.scripts.json
File metadata and controls
33 lines (33 loc) · 1.7 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
// The SCRIPTS-layer type-check program for @objectstack/objectql (#10756).
//
// `packages/objectql/scripts/` held a compatibility checker with a documented
// CLI -- `dry-run-hash-compat.ts`, which `src/dry-run-hash-compat.test.ts`
// imports `runDryRun` from -- and no tsc program this package's `typecheck`
// runs had ever read a line of it. `tsconfig.json` selects `src/**/*` and the
// directory is not under it, so the package passed `check:type-check-coverage`
// as COVERED with a whole source directory unchecked. Injecting a `number`
// initialised with a string into that file moved no gate.
//
// A SIBLING rather than a wider `include` on `tsconfig.json`, which is the
// distinction #5475 drew for `packages/spec` and it holds for the same reason
// here: that config emits (`rootDir: "src"`, `outDir: "dist"`, and `dev` runs
// `tsc -w` through it), so widening it to reach `scripts/` would put the
// directory in front of the emit and `rootDir` would reject it. This program
// emits nothing, so it can neutralise `rootDir` without touching what ships.
//
// STRICTNESS IS INHERITED and deliberately not relaxed: `strict`,
// `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest come
// from the root config through `tsconfig.json`. The directory type-checks clean
// under them today -- it entered with ZERO recorded debt, and there is no
// ledger here to record any in.
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
// `.` rather than the inherited `src`, because the files this program
// checks are the ones outside `src`. Safe precisely because nothing is
// emitted from here -- see the header.
"rootDir": "."
},
"include": ["scripts/**/*"]
}