mirror of
https://github.com/pezkuwichain/pezkuwi-dev.git
synced 2026-11-15 03:07:06 +00:00
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.
This commit is contained in:
1 parent
b12b3d77e8
commit
aa231ca6b9
1 file changed
+7
-3
@@ -7,8 +7,6 @@ import yargs from 'yargs';
|
|||||||
|
|
||||||
import { __dirname, execPm, GITHUB_REPO, logBin } from './util.mjs';
|
import { __dirname, execPm, GITHUB_REPO, logBin } from './util.mjs';
|
||||||
|
|
||||||
const TS_CONFIG_BUILD = true;
|
|
||||||
|
|
||||||
logBin('pezkuwi-dev-run-lint');
|
logBin('pezkuwi-dev-run-lint');
|
||||||
|
|
||||||
// Since yargs can also be a promise, we just relax the type here completely
|
// 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']) {
|
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');
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user