refactor: move typeAware/typeCheck from CLI flags to vite.config.ts#739
Merged
refactor: move typeAware/typeCheck from CLI flags to vite.config.ts#739
Conversation
✅ Deploy Preview for viteplus-staging canceled.
|
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
81de613 to
aec26b4
Compare
94d6f7b to
82abaa7
Compare
82abaa7 to
2d8a8db
Compare
aec26b4 to
a764269
Compare
fengmk2
commented
Mar 9, 2026
cpojer
approved these changes
Mar 9, 2026
a764269 to
268e38e
Compare
9c62ad8 to
9121608
Compare
268e38e to
a2d52fd
Compare
a2d52fd to
157d592
Compare
Remove the 874-line hand-written oxlint-config.ts and import OxlintConfig directly from the oxlint package, which already exports the same type. Clean up related lint overrides and typos exclusions for the deleted file.
157d592 to
6d509ca
Compare
camc314
reviewed
Mar 9, 2026
oxlint's TypeScript checker (tsgolint) does not support baseUrl in tsconfig.json, causing lint failures after migration. Guard both migration and lint --init paths to omit typeAware/typeCheck defaults when baseUrl is present.
5a4c483 to
6237268
Compare
fengmk2
commented
Mar 9, 2026
When tsconfig.json has baseUrl and we skip injecting typeAware/typeCheck, log a warning with actionable advice to run `npx @andrewbranch/ts5to6 --fixBaseUrl .` to remove baseUrl. Added warning in both migration and lint --init paths. Updated snap test fixture with .oxlintrc.json to capture the warning output.
4b5b347 to
56dfed9
Compare
…hed package The static import of init-config.js in bin.ts transitively loads detect-indent (a devDependency), causing ERR_MODULE_NOT_FOUND when vite-plus is installed as a dependency. Change to dynamic import so it's only loaded for local commands that actually need it. Fixes frm-stack E2E test failure.
The previous lazy-import fix was insufficient — init-config.js is still loaded for all non-global commands. The actual root cause is that these packages were in devDependencies but are imported at runtime by tsc-compiled dist/utils/json.js. Move them to dependencies so they're available when vite-plus is installed in other projects.
fengmk2
commented
Mar 9, 2026
…t-indent dependency chain Move hasBaseUrlInTsconfig from utils/json.ts (which imports detect-indent) to a new utils/tsconfig.ts that uses only Node.js builtins. This breaks the transitive dependency chain from init-config.ts → json.ts → detect-indent, allowing detect-indent/detect-newline to remain devDependencies since they are only used by rolldown-bundled global CLI code.
…nto vite.config.ts The $schema annotation in .oxlintrc.json/.oxfmtrc.json causes TS2769 type errors when merged into vite.config.ts because it's not part of OxlintConfig/OxfmtConfig types. Strip it before merging.
fengmk2
commented
Mar 9, 2026
Member
Author
MahmoodKhalil57
added a commit
to MahmoodKhalil57/vite-plus
that referenced
this pull request
Mar 14, 2026
The `--no-type-check` flag was removed from `vp check` in voidzero-dev#739, but the help examples section still referenced it. Replace with `--no-lint` which is a valid flag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 14, 2026
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.

oxlint natively reads
options.typeAwareandoptions.typeCheckfromits config file, so there's no need for
vp checkto inject these asCLI flags when calling
vp lint.--no-type-aware/--no-type-checkflags fromvp checkoptions: { typeAware: true, typeCheck: true }defaults invp lint --init,vp migrate, and project root vite.config.ts--type-aware/--type-checkfrom migrated scriptsoxc.typeAwarefrom VS Code settings (extension reads fromconfig automatically)
OxlintOptionstype withtypeAwareandtypeCheckfields