From aa231ca6b9ce9cdd9ec1e126482cf03b62aaaa40 Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Sat, 10 Oct 2026 01:05:23 +0400 Subject: [PATCH] run-lint: type-check the referenced projects The root tsconfig.build.json has `files: []` and only references the packages, so `tsc --noEmit --project tsconfig.build.json` checked no file: a type error added to a package source passed lint with exit code 0. --build follows the references. It cannot be combined with --noEmit (TS6310), so it writes the declarations the build writes; previous build output is removed first, since package configs without an `include` pick it up as source. Measured on the consumers: no new errors, 1-47 s. --- packages/dev/scripts/pezkuwi-dev-run-lint.mjs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/dev/scripts/pezkuwi-dev-run-lint.mjs b/packages/dev/scripts/pezkuwi-dev-run-lint.mjs index 3d6eb13..6f9de0a 100755 --- a/packages/dev/scripts/pezkuwi-dev-run-lint.mjs +++ b/packages/dev/scripts/pezkuwi-dev-run-lint.mjs @@ -7,8 +7,6 @@ import yargs from 'yargs'; import { __dirname, execPm, GITHUB_REPO, logBin } from './util.mjs'; -const TS_CONFIG_BUILD = true; - logBin('pezkuwi-dev-run-lint'); // Since yargs can also be a promise, we just relax the type here completely @@ -36,5 +34,11 @@ if (!argv['skip-eslint']) { } if (!argv['skip-tsc']) { - execPm(`pezkuwi-exec-tsc --noEmit --emitDeclarationOnly false --pretty${TS_CONFIG_BUILD ? ' --project tsconfig.build.json' : ''}`); + // The root tsconfig.build.json has `files: []` and only references the + // packages, so `tsc --project` on it checks no file at all. --build follows + // the references; it cannot be combined with --noEmit, so it writes the + // declarations the build would. Previous build output is removed first, since + // package configs without an `include` would otherwise pick it up as source. + execPm('pezkuwi-dev-clean-build'); + execPm('pezkuwi-exec-tsc --build tsconfig.build.json --pretty'); }