no-emit-in-root-config
Require "noEmit": true in the root tsconfig.json file.
Targeted pattern scopeโ
The compilerOptions.noEmit field in the root-level tsconfig.json.
What this rule reportsโ
This rule reports when the root tsconfig.json file does not set
"noEmit": true in compilerOptions, or sets it to false.
Why this rule existsโ
In this plugin's opinionated model, the root tsconfig.json should coordinate
other configs or provide shared settings, not emit JavaScript itself. Requiring
"noEmit": true makes that separation explicit and avoids accidental output
from the root config.
โ Incorrectโ
{
"compilerOptions": {
"outDir": "./dist"
}
}
The root config is allowed to emit because noEmit is not enabled.
โ Correctโ
{
"compilerOptions": {
"noEmit": true
}
}
When not to use itโ
Disable this rule when the root tsconfig.json is intentionally also the emit
config for the project.
Package documentationโ
Rule catalog ID: R006