diff --git a/scripts/typecheck.js b/scripts/typecheck.js index ea1f4bead..81a2c9bc2 100644 --- a/scripts/typecheck.js +++ b/scripts/typecheck.js @@ -140,7 +140,16 @@ function runTypeCheck() { const extraArgs = process.argv.slice(2); // Prefer local TypeScript binary when available - const runnerArgs = ["-p", "tsconfig.json", "--noEmit", ...extraArgs]; + // --pretty false: TS 6 enables pretty output even when piped, which breaks + // the line-based error parser below + const runnerArgs = [ + "-p", + "tsconfig.json", + "--noEmit", + "--pretty", + "false", + ...extraArgs, + ]; let execArgs = null; try { const tscBin = require.resolve("typescript/bin/tsc"); diff --git a/tsconfig.json b/tsconfig.json index 69354e8d0..ecd844cd7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,8 @@ "paths": { "@/*": ["./*"] }, + // TS 6.0: "types" now defaults to [] (no auto-inclusion of node_modules/@types) + "types": ["node", "jest"], "incremental": true, "tsBuildInfoFile": ".tsbuildinfo", "skipLibCheck": true,