Run tsc on multiple tsconfigs in parallel. Your tsconfig.json files are discovered automatically, and .gitignore files are respected. The --emitDeclarationOnly option is added for you, and node_modules/.tsc-lint is used as the output directory.
Note: Project references are not supported.
pnpm add tsc-lint -DUpdate your project's package.json to add a lint script.
{
"scripts": {
"lint": "tsc-lint"
}
}By default, the working directory is searched for tsconfig.json files. You can pass one or more different directories as an argument, and those will be searched instead.
# Lint only your ./test/ folder.
pnpm lint testIf your project is consumed by other projects (e.g. a library), you should not have noEmit in your tsconfig.json files. The emit step is critical for catching certain errors, which is why tsc-lint uses the --emitDeclarationOnly option instead.
If you are using noEmit, that will be detected and tsc-lint will avoid the emit step.
tsc-lint --help# Enable debug logging.
DEBUG="tsc-lint" pnpm lint