feat(vscode): add language-specific formatter overrides to .vscode/settings.json#1491
Merged
fengmk2 merged 5 commits intovoidzero-dev:mainfrom Apr 28, 2026
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
.vscode/settings.json.vscode/settings.json
cd780e5 to
b210a53
Compare
Collaborator
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
jong-kyung
reviewed
Apr 28, 2026
…m:hamsurang/vite-plus into feat/create-vscode-per-language-formatter
jong-kyung
approved these changes
Apr 28, 2026
Collaborator
|
@fengmk2 Could you re-run the CI? It seems to be a network issue on setup-node. |
fengmk2
approved these changes
Apr 28, 2026
Member
|
@oilater @jong-kyung Thanks!! |
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.
Closes #1485
Summary
editor.defaultFormatter: oxc.oxc-vscodeinside[javascript]/[javascriptreact]/[typescript]/[typescriptreact]blocks in the generated.vscode/settings.json. Without these, a user-level[language]setting (e.g. a global Prettier override) silently wins over the workspace-level default.VSCODE_LANGUAGE_OVERRIDESconstant soVSCODE_SETTINGSkeeps a single concern.docs/guide/ide-integration.mdto reflect the new shape and explain why per-language blocks are required.deepMergebehavior is unchanged, so a user's pre-existing[typescript]: prettierblock is still preserved duringvp createagainst an existing.vscode/settings.json.Approach
The main question was whether to map
[lang]blocks per project template or to always include the JS/TS family. Picked the latter becausevp createaccepts remote templates (github:user/repo, arbitrarycreate-*packages) where the language set can't be known up front — a per-template branch ends in a JS/TS fallback for these anyway, so the per-template path doesn't actually buy correctness for the cases it's meant to help.vp createandvp migrateconsistent with a single source of truth inVSCODE_SETTINGS.[lang]blocks has no runtime effect (VS Code only applies them when matching files are opened) and is evolution-safe if the user later adds a.tsfile to an initially JS-only project.Tests
pnpm -F vite-plus test src/utils/__tests__/editor.spec.ts— extended assertions verify the four[lang]blocks are written, and that an existing user's[typescript]: prettieris preserved during merge.