Conversation
Defines a portable rule the four oxc editor extensions (oxc-vscode, oxc-zed, oxc-intellij-plugin, coc-oxc) can use to decide whether to launch `vp lint --lsp` / `vp fmt --lsp` instead of plain oxlint/oxfmt: locate the `vp` binary via each extension's existing bin-resolution chain, falling back to a package.json deps check. Includes the canonical rule, a reference TypeScript implementation, per-extension migration notes, design decisions, and a conformance fixture table. Refs #1557
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
How to use the Graphite Merge QueueAdd the label auto-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. |
Clarifies that the RFC's scope is the four oxc editor extensions, not detection across all Vite+ tooling.
Drops the quoted question from the H1 and parallels the noun-phrase style used by other RFCs (e.g. package-manager-detection.md).
Three correctness fixes uncovered by adversarial review: 1. Signal #1 is now strictly project-scoped. User-configured binPath overrides, global node_modules, and $PATH are explicitly excluded so that a globally-installed `vp` or a `vp` on $PATH cannot classify an unrelated workspace as Vite+. Locked as a decision and reflected in every per-extension migration plan. 2. The walk-up now stops AT the workspace root, not after. The previous reference loop set a "stop after this" flag and still advanced to the parent, which would let a nested checkout inherit a vite-plus install from its outer parent directory. Added a `parent-vite-plus-nested-repo` conformance fixture. 3. Signal #1 now requires a valid `vite-plus` package at the resolved ancestor: `node_modules/vite-plus/package.json` must parse and have `name === "vite-plus"`. The conformance fixture `bin-vp-without-package-json` previously required `null` but the reference code returned `vp-binary-found`; both are now consistent. Added `bin-vp-with-malformed-package`, `global-vp-on-path`, and `user-binpath-override` fixtures. Refs #1557
Two cleanups from /simplify review: - Read package.json once per walked-up directory (workspace-root check and deps check now share a single parse), eliminating a double filesystem read per ancestor. - Drop the inline "Signal #1" / "Signal #2" / "Stop AT workspace root" comments — they narrate what the code already says via the variable names and control flow. No behavioural change. The doc comment on isValidVitePlusInstall is kept because it captures non-obvious intent (rejecting orphan trees). Refs #1557
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.

Defines a portable rule the four oxc editor extensions (oxc-vscode,
oxc-zed, oxc-intellij-plugin, coc-oxc) can use to decide whether to
launch
vp lint --lsp/vp fmt --lspinstead of plain oxlint/oxfmt:locate the
vpbinary via each extension's existing bin-resolutionchain, falling back to a package.json deps check.
Includes the canonical rule, a reference TypeScript implementation,
per-extension migration notes, design decisions, and a conformance
fixture table.
Refs #1557