fix(editor): Remove overrides from default config - #2357
Conversation
Do not set the options in the settings.json, to prevent a mismatch between vp lint and the lsp. These options are also not set in the vscode settings.
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8580dc70a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| fixKind: 'safe_fix', | ||
| typeAware: true, | ||
| unusedDisableDirectives: 'deny', | ||
| }, |
There was a problem hiding this comment.
Keep Zed type-aware for generated lint configs
For projects produced by the normal vp create/vp migrate path without a baseUrl, injectLintTypeCheckDefaults explicitly enables lint.options.typeAware, but the Oxlint language server does not consume the Vite+ lint block and now receives no corresponding typeAware initialization option. Consequently, Zed stops reporting the type-aware rules that vp lint runs, merely reversing the mismatch this change intends to prevent; the editor settings need to reflect the resolved project lint option rather than unconditionally dropping it.
Useful? React with 👍 / 👎.
| fixKind: 'safe_fix', | ||
| typeAware: true, | ||
| unusedDisableDirectives: 'deny', | ||
| }, |
There was a problem hiding this comment.
Remove legacy overrides from existing Zed settings
When a project already has the .zed/settings.json written by an earlier Vite+ version, rerunning vp migrate --editor zed cannot apply this fix: writeEditorConfigs merges only missing keys and explicitly preserves every existing value, so the old typeAware: true and unusedDisableDirectives: "deny" entries remain indefinitely. Existing Zed users therefore retain the exact CLI/LSP mismatch this commit is intended to eliminate; the migration path needs targeted handling for these legacy generated values.
Useful? React with 👍 / 👎.
| fixKind: 'safe_fix', | ||
| typeAware: true, | ||
| unusedDisableDirectives: 'deny', | ||
| }, |
There was a problem hiding this comment.
Update the documented Zed initialization settings
When users follow the manual Zed setup instead of generating the file, docs/guide/ide-integration.md lines 66-67 still instruct them to set both typeAware: true and unusedDisableDirectives: "deny". That path therefore recreates the exact CLI/language-server mismatch this removal is intended to prevent, so the documented configuration needs to be updated together with the generated defaults.
Useful? React with 👍 / 👎.
Do not set the options in the
.zed/settings.json, to prevent a mismatch betweenvp lintand the language server.These options are also not set in the vscode settings.