Skip to content

fix(lint): stop workspace discovery at the Windows drive root - #1947

Open
soyorin33 wants to merge 1 commit into
Tencent:mainfrom
soyorin33:fix/lint-workspace-root-windows
Open

soyorin33 wants to merge 1 commit into
Tencent:mainfrom
soyorin33:fix/lint-workspace-root-windows

Conversation

@soyorin33

Copy link
Copy Markdown

For a file outside any workspace, the lint helpers walk up from a drive-qualified directory using POSIX dirname. They can reach . and pick up the linter's current working directory as the file's workspace or package. Ascend with the native path API, retaining the normalized slash form consumed by the rules.

Test plan

Native Windows, Node 22.19.0, baseline df433c6. Both new cases failed before the fix: the workspace lookup returned . for a temporary tree outside the checkout. The helper suite passes after the change, including fixtures with and without their own package manifest. Four relevant suites passed all 84 tests. Across the lint plugin the baseline had 1,078 passed, 119 failed and 80 skipped. This branch had 1,179 passed, 20 failed and 80 skipped. The remaining rule failures are in family-facts (#1927) and mock-source (#1935); the separate command-line-length issue affects the 80 skipped cases.

Typecheck, targeted type-aware lint and diff checks passed. Repository lint still reports the 26 known family-facts diagnostics. The change affects contributor lint rules; it does not change CLI behavior. Prepared with Codex assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants