Skip to content

fix: correctly resolve tsgolint in yarn monorepo packages#1310

Merged
fengmk2 merged 5 commits intovoidzero-dev:mainfrom
rChaoz:fix/tsgolint-yarn-monorepo
Apr 6, 2026
Merged

fix: correctly resolve tsgolint in yarn monorepo packages#1310
fengmk2 merged 5 commits intovoidzero-dev:mainfrom
rChaoz:fix/tsgolint-yarn-monorepo

Conversation

@rChaoz
Copy link
Copy Markdown
Contributor

@rChaoz rChaoz commented Apr 5, 2026

Closes #1296

The oxlint-tsgolint executable resolution algorithm assumes that there is a node_modules directory in the current working directory (current package directory). However, this is only true for pnpm, yarn only creates a single node_modules in the workspace root, unlike pnpm which creates one under every package.

Because of this, vp lint/vp check fail to find the tsgolint executable. Updates the algorithm to extract the node_modules directory location based on resolve(), rather than process.cwd().

Additionally improves the error message to list all tried paths, rather than just one:

Before

VITE+ - The Unified Toolchain for the Web

Failed to find tsgolint executable: OXLINT_TSGOLINT_PATH points to '.\node_modules\.bin\tsgolint.cmd' which does not exist

Now

VITE+ - The Unified Toolchain for the Web

error: Failed to resolve lint command: GenericFailure, Error: Unable to resolve oxlint-tsgolint executable, tried:
- C:\Users\Matei\projects\agent-lab\node_modules\vite-plus\node_modules\.bin\tsgolint.exe
- C:\Users\Matei\projects\agent-lab\node_modules\vite-plus\node_modules\.bin\tsgolint.cmd
- C:\Users\Matei\projects\agent-lab\node_modules\.bin\tsgolint.exe
- C:\Users\Matei\projects\agent-lab\node_modules\.bin\tsgolint.cmd

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 5, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit f0e68a4
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69d36a877897b10008dfb751

@fengmk2 fengmk2 self-assigned this Apr 6, 2026
@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Apr 6, 2026
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 6, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Member

@fengmk2 fengmk2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rChaoz Thanks!

@fengmk2 fengmk2 merged commit dad6bb4 into voidzero-dev:main Apr 6, 2026
67 checks passed
@rChaoz rChaoz deleted the fix/tsgolint-yarn-monorepo branch April 6, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp check fails in Yarn monorepo nested directory

2 participants