fix: resolve ancestor tsconfig for excluded nearest config#904
Conversation
How to use the Graphite Merge QueueAdd the label 0-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
Fixes tsconfig resolution so that when the nearest tsconfig.json excludes a file, the resolver can fall back to an ancestor tsconfig.json (regression covered by voidzero-dev/vite-plus#1443).
Changes:
- Update
TsConfigResolverto continue searching ancestor configs whenGetAncestorConfigFileNameyields no result. - Add a Go regression unit test covering “nearest config excludes file” behavior for both sequential and parallel resolution.
- Add an e2e fixture + snapshot test to ensure semantic linting runs without diagnostics in the reproduced scenario.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/utils/find_tsconfig.go | Adjusts ancestor tsconfig lookup to handle “nearest config excludes file” by computing the next ancestor config. |
| internal/utils/find_tsconfig_test.go | Adds regression test ensuring resolver returns the ancestor/root config when the nearest config excludes the file. |
| e2e/snapshot.test.ts | Adds an e2e test asserting no diagnostics when nearest tsconfig excludes the file. |
| e2e/fixtures/issue-vp-1443/tsconfig.json | Adds root fixture tsconfig enabling Node typing for semantic checks. |
| e2e/fixtures/issue-vp-1443/packages/cli/tsconfig.json | Adds nested fixture tsconfig that excludes all files to reproduce the bug. |
| e2e/fixtures/issue-vp-1443/packages/cli/src/utils/terminal.ts | Adds fixture TS file used by the e2e regression test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
1fcd8dc to
e75dc0e
Compare

fixes voidzero-dev/vite-plus#1443