Skip to content

lint,fmt: Deprecate the wrapper bin for stable IDE support #1557

Closed

Description

@leaysgur

Currently, 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.

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

Activity

  1. leaysgur commented on May 12, 2026

    @leaysgur
    ContributorAuthor

    @fengmk2 Are we getting this right?

    @Sysix @nrayburn-tech Any thoughts on this?

  2. fengmk2 commented on May 12, 2026

    @fengmk2
    Member

    @leaysgur LGTM 💯

    You can directly assign me any tasks that need help.

  3. Sysix commented on May 12, 2026

    @Sysix

    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).

  4. leaysgur commented on May 13, 2026

    @leaysgur
    ContributorAuthor

    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".

  5. nrayburn-tech commented on May 13, 2026

    @nrayburn-tech

    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.

  6. leaysgur commented on May 13, 2026

    @leaysgur
    ContributorAuthor

    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. 🙈

  7. nrayburn-tech commented on May 13, 2026

    @nrayburn-tech

    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.

  8. fengmk2 commented on May 13, 2026

    @fengmk2
    Member

    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.

  9. leaysgur commented on May 13, 2026

    @leaysgur
    ContributorAuthor

    Thank you, please!
    Also, may I ask you to handle VITE+ ... message fixes? 🙏🏻

  10. fengmk2 commented on May 13, 2026

    @fengmk2
    Member

    Thank you, please! Also, may I ask you to handle VITE+ ... message fixes? 🙏🏻

    Sure, I will handle it too.

  11. Sysix commented on May 13, 2026

    @Sysix

    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
  12. leaysgur commented on May 13, 2026

    @leaysgur
    ContributorAuthor

    Got it, thanks. 🥹

    Anyway, I'll let both of you know here once the preliminary tasks (by MK) are complete.

  13. 22 remaining items

  14. fengmk2 commented on May 18, 2026

    @fengmk2
    Member

    @Sysix @nrayburn-tech https://github.com/voidzero-dev/vite-plus/pull/1614/changes a standardized way to determine "whether a project is a Vite+ project or not" RFC, please help review and provide any feedback or suggestions. 💌

  15. added this to the Beta milestone on May 18, 2026
  16. Stanzilla commented on May 20, 2026

    @Stanzilla

    I'd rather see the project move this direction oxc-project/oxc#22539 to avoid all this extra headache

  17. modified the milestones: Beta, RC on Jul 6, 2026
  18. leaysgur commented on Sep 17, 2026

    @leaysgur
    ContributorAuthor

    @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:

    For these reasons, I am planning to recreate a PR with a minimal scope and merge relatively soon.

  19. added a commit that references this issue on Sep 21, 2026
    476ee7c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

Priority

High

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions