GeezerVison is showing github.com — lint,fmt: Deprecate the wrapper bin for stable IDE support · Issue #1557 · voidzero-dev/vite-plus
lint,fmt: Deprecate the wrapper bin for stable IDE support #1557DescriptionCurrently, lint|fmt IDE support for Vite+ is implemented as follows:
- When the
vite-plus package is installed locally, the package manager places bin/oxlint|fmt
- These are special binaries with
vite.config.ts support enabled, distinct from the standard oxlint|fmt binaries
- Individual editor extensions then reference these binaries and launch
--lsp
- The discovery process for these binaries should remain the same as in non-Vite+ projects
However, some issues have also come to light.
- When using
npm or yarn as the package manager, the custom binary is not installed at all!
- Installing
oxlint|fmt separately overwrites the custom binary
- IMO: This should be triaged as a separate issue, since this overrides
vp lint|fmt too
- When you try to setup editor by yourself, it's unclear to know what should be used
- The priority of the method VSCode extension uses to search the
bin/ was lower than that of require.resolve(), causing it to fail to locate the custom binary when other workspaces were open
Proposed solution
Following our team meeting, we would like to proceed as follows.
- Deprecate the wrapper binary
- Editors that support LSP should use
vp lint|fmt --lsp instead
- Editors that do not use LSP should use commands like
vp fmt --stdin-filepath
Tasks
- Stop writing
VITE+... header message to stdout for these usecases @fengmk2
vp lint --lsp
vp fmt --lsp, vp fmt --stdin-filepath
- Define a standardized way to determine "whether a project is a Vite+ project or not" @fengmk2
- Update editor extensions to detect Vite+ project and use
vp lint|fmt --lsp
- Remove wrapper bin
- Update docs?
Reacted by Max Reacted by JongKyung Lee , Nicolas Stepien and Alexander Chehovskii Activityleaysgur commented on May 12, 2026 ContributorAuthor More actions fengmk2 commented on May 12, 2026 @leaysgur LGTM 💯
You can directly assign me any tasks that need help. Sysix commented on May 12, 2026
Editors that support LSP should use vp lint|fmt --lsp instead
Instead of node node_modules/.bin/oxlint, should we target node node_modules/.bin/vp?
Running vp natively could be tricky on VS Code extension. Currently, there are problems detecting node with some non-standard setups, like mise and nvm. Running VS Code via CLI or via GUI can change the context too (oxc-project/oxc-vscode#255). leaysgur commented on May 13, 2026 ContributorAuthor More actions
Instead of node node_modules/.bin/oxlint, should we target node node_modules/.bin/vp?
That is my understanding. So, we need to resolve node and oxlint|fmt|vp separately, right?
EDIT: One more question, what was the motivation to resolve node itself instead of leaving it to shebang in bin?
@fengmk2 Please let me know if you have any thoughts on this. Also, it looks like we need to define a standardized way to determine "whether a project is a Vite+ project or not". nrayburn-tech commented on May 13, 2026 No major concerns from me.
IntelliJ doesn’t have the same user base as VS Code, so it doesn’t support as many variations as Sysix has to try and figure out.
The Zed extension API is very limited which is always a concern if anything new needs to be introduced, but I don’t think this change should be a problem there.
For your question about whether a project is a Vite+ project or not, what context are you trying to answer that in? The existence of the package in the package.json file tells us that a project is Vite+ (some nuance here with different package managers and transitive dependencies, but nothing special). This isn’t typically an issue to solve at the plugin level, but maybe you’re trying to get that information in a different context so that’s not always helpful. leaysgur commented on May 13, 2026 ContributorAuthor More actions Thank you!
The reason I brought up the Vite+ project detection was due to these questions:
- It's up to the user to decide which directory in a repo as the LSP workspace, indeterminate
- Even if there is a
package.json in that directory, we don't know if it's the root package.json or not
- Even if we search-up for a
package.json, what would be considered the "root marker"?
- Or
require.resolve('vite-plus') or something?
If these aren't actually issues, then my concerns were unfounded. 🙈 nrayburn-tech commented on May 13, 2026 I see. I do think those can be problems, but I assume (big assumption) they’re solved already within the plugins. The same issues exist for Oxfmt/Oxlint that now exists for Vite+. Each plugin could be solving this completely differently though, which could provide a slightly different experience. fengmk2 commented on May 13, 2026
It looks like we need to define a standardized way to determine "whether a project is a Vite+ project or not"
@leaysgur Let me think about this question. I will provide a standard solution. I understand that not only the oxc extension needs this logic handling, but Vite+ itself also needs this in it's migrate command. leaysgur commented on May 13, 2026 ContributorAuthor More actions Thank you, please!
Also, may I ask you to handle VITE+ ... message fixes? 🙏🏻 fengmk2 commented on May 13, 2026
Thank you, please! Also, may I ask you to handle VITE+ ... message fixes? 🙏🏻
Sure, I will handle it too. Sysix commented on May 13, 2026
That is my understanding. So, we need to resolve node and oxlint|fmt|vp separately, right?
Yes. The oxlint/fmt/vp part is easy. The node or vp will be difficult. I learned this week that VS Code (electron app) are loading different envs. Maybe something like oxc-project/oxc-vscode#261 will help 🤞
EDIT: One more question, what was the motivation to resolve node itself instead of leaving it to shebang in bin?
Can't remember the right reason, but every platform does handle things differently + the shell problems below:
Little summary from ChatGPT 🤖:
A few historical accidents stacked together:
- terminals existed before GUIs
- remote logins existed before desktop sessions
- shells were originally for humans, not app environments
- every shell added its own startup semantics
- distros and OS vendors patched behavior differently
- developer tools started abusing shell init files as plugin systems
So now:
- GUI apps inherit one environment
- terminals synthesize another
- shells mutate state dynamically
- toolchains inject themselves into startup scripts
- Electron apps sit awkwardly between desktop app and terminal app
leaysgur commented on May 13, 2026 ContributorAuthor More actions Got it, thanks. 🥹
Anyway, I'll let both of you know here once the preliminary tasks (by MK) are complete. fengmk2 commented on May 18, 2026 Stanzilla commented on May 20, 2026 leaysgur commented on Sep 17, 2026 ContributorAuthor More actions @fengmk2 @Sysix @nrayburn-tech
I hesitated to write essentially the same thing across four separate IDE PRs, and since everyone involved is gathered here, I'll leave my comment here instead.
(Resolving this issue is also necessary for the upcoming VP 1.0 release, so I'd really appreciate your help... meaning it would be a huge help if you could review PRs. 🙏🏻 (though of course, after your vacation!))
First of all, in the current PR, nested config support is forcibly disabled on each IDE side, but I'm thinking we should do it collectively for both CLI and LSP on the Oxapps side.
As for the unified behavior in VP mode, it will only use root find-up, which applies to both CLI and LSP usage.
This will also help #2698
NOTE:
- Oxapps do not have the concept of a project root, so some edge cases may still exist
- If no config found even in project root?
- There is still the risk (known issue) that if a config file containing
.lint|fmt is placed somewhere other than the project root
- and it is detected as the root depending on the CLI's CWD or the LSP workspace, that config file will be used
- Moving away from specifying
-c in the CLI to align the behaviors of the CLI and LSP is a separate topic
PRs for IntelliJ and VSCode partially include changes (with different approaches) to prevent the VP mode LSP and the standard LSP from conflicting.
My understanding is that this only partially resolves the issue previously reported for VSCode as oxc-project/oxc-vscode#145.
(Zed and CoC are structurally unaffected by this issue in the first place.)
While we need to decide whether to introduce the complete implementation at this stage, I think we at least need to reach a consensus on the direction?
In VS Code, features like SaveAll and the Problems panel could still end up running with the wrong LSP, and the intended config files won't even be recognized in the first place.
UPDATE:
- The previous PRs are a bit large, and there is less time than expected until the v1-rc release date
- v1-rc, with the bin wrapper removed, has already been released, which is affecting early adopters who updated quickly
For these reasons, I am planning to recreate a PR with a minimal scope and merge relatively soon. added a commit that references this issue on Sep 21, 2026This issue will close once commit 476ee7c is merged into the 'main' branch.476ee7c
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|