Background
Using a root tsconfig.json with "files": [] and "references" to sub-projects is a common pattern. The Vite official template, for example, uses this structure:
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}
tsc --noEmit on the root does nothing; tsc --build is required to check all referenced sub-projects.
Current Behavior
Rslint only creates programs for tsconfigs explicitly listed in parserOptions.project and does not walk the reference tree. Sub-project files are marked IsSourceFromProjectReference and skipped during type-checking. Currently users must manually enumerate all sub-project tsconfigs (e.g., "tsconfig.*.json") to get full coverage.
This does not prevent files from being linted — lint rules still run normally — so users may get a clean 0-error result while type-checking of referenced projects has silently been skipped.
Proposal
Add a parserOptions.followProjectReferences option. When enabled, Rslint automatically resolves references from each tsconfig and creates programs for all referenced sub-projects. Default: false (preserves existing behavior).
export default defineConfig({
parserOptions: {
project: ["./tsconfig.json"],
followProjectReferences: true,
},
});
This could later default to true, since silently skipping type-checking of referenced projects is a papercut for new users. Defaulting to recursive checking feels intuitive, but it differs from tsc's default and would be a breaking change — though if the previous default produced zero errors and the new default surfaces real ones, the old behavior was arguably a false sense of safety.
Background
Using a root
tsconfig.jsonwith"files": []and"references"to sub-projects is a common pattern. The Vite official template, for example, uses this structure:{ "files": [], "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" } ] }tsc --noEmiton the root does nothing;tsc --buildis required to check all referenced sub-projects.Current Behavior
Rslint only creates programs for tsconfigs explicitly listed in
parserOptions.projectand does not walk the reference tree. Sub-project files are markedIsSourceFromProjectReferenceand skipped during type-checking. Currently users must manually enumerate all sub-project tsconfigs (e.g.,"tsconfig.*.json") to get full coverage.This does not prevent files from being linted — lint rules still run normally — so users may get a clean 0-error result while type-checking of referenced projects has silently been skipped.
Proposal
Add a
parserOptions.followProjectReferencesoption. When enabled, Rslint automatically resolvesreferencesfrom each tsconfig and creates programs for all referenced sub-projects. Default:false(preserves existing behavior).This could later default to
true, since silently skipping type-checking of referenced projects is a papercut for new users. Defaulting to recursive checking feels intuitive, but it differs fromtsc's default and would be a breaking change — though if the previous default produced zero errors and the new default surfaces real ones, the old behavior was arguably a false sense of safety.