Repository navigation
Conversation
Pduhard
marked this pull request as draft
October 15, 2026 10:00
Pduhard
marked this pull request as ready for review
October 15, 2026 10:17
…s them vp lint and vp fmt resolved oxlint, oxlint-tsgolint and oxfmt from process.cwd() first, and Node walks up to the filesystem root. A project that does not install these tools itself picked up any copy in a parent directory, such as the main checkout around a git worktree. That copy can be an older oxlint that predates Vite+ mode: it walks nested configs past the project and applies the parent's .oxlintrc.json, so every lint.overrides entry in vite.config.ts is ignored. The project's copy now runs only when the nearest package.json or the workspace root declares it, and it is installed between that package and the workspace root, the rule resolve-core already applies to Vite. Otherwise the copy shipped with the CLI runs. Yarn PnP resolves the declared copy through its own resolver. findWorkspaceRoot moves to utils/workspace-root.ts, next to findPackageRoot and dirsUpTo, so the lint and fmt resolvers do not load Vite. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Read the nearest package.json with readNearestPackageJson and resolve with createRequire, as resolve-core does for Vite, which also covers Yarn PnP. Find the workspace root with findMonorepoRoot, as resolve-vite-config does. Drop dirsUpTo, findPackageRoot, the PnP branch and the installed-between check; keep one regression test through lint() plus the rule's own spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pduhard
force-pushed
the
fix/resolve-oxlint-inside-project
branch
from
October 22, 2026 14:36
4bd9e57 to
da7a6a8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vp lintandvp fmtresolve oxlint and oxfmt from the current directory upward, so a project that does not install them runs any copy found in a parent folder instead of the bundled one (#3065).The project's copy now runs only when the nearest
package.jsonor the workspace root declares it, the same rule Vite uses for its optional dependencies. Otherwise the bundled copy runs. In a monorepo withoutpnpm-workspace.yamlor aworkspacesfield, a copy declared at the root no longer runs from a sub-package.Checked with the repro from the issue on Linux, Windows and Yarn PnP.
Fixes #3065