Skip to content

refactor: move typeAware/typeCheck from CLI flags to vite.config.ts#739

Merged
fengmk2 merged 8 commits intomainfrom
improve-vp-check
Mar 9, 2026
Merged

refactor: move typeAware/typeCheck from CLI flags to vite.config.ts#739
fengmk2 merged 8 commits intomainfrom
improve-vp-check

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 9, 2026

oxlint natively reads options.typeAware and options.typeCheck from
its config file, so there's no need for vp check to inject these as
CLI flags when calling vp lint.

  • Remove --no-type-aware / --no-type-check flags from vp check
  • Add options: { typeAware: true, typeCheck: true } defaults in
    vp lint --init, vp migrate, and project root vite.config.ts
  • Strip --type-aware / --type-check from migrated scripts
  • Remove oxc.typeAware from VS Code settings (extension reads from
    config automatically)
  • Add OxlintOptions type with typeAware and typeCheck fields

@netlify
Copy link

netlify bot commented Mar 9, 2026

Deploy Preview for viteplus-staging canceled.

Name Link
🔨 Latest commit 69220fb
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-staging/deploys/69aef54fce7ba500082dfe2e

@fengmk2 fengmk2 self-assigned this Mar 9, 2026
Copy link
Member Author

fengmk2 commented Mar 9, 2026

@fengmk2 fengmk2 changed the base branch from main to graphite-base/739 March 9, 2026 08:48
@fengmk2 fengmk2 force-pushed the improve-vp-check branch from 81de613 to aec26b4 Compare March 9, 2026 08:48
@fengmk2 fengmk2 force-pushed the graphite-base/739 branch from 94d6f7b to 82abaa7 Compare March 9, 2026 08:48
@fengmk2 fengmk2 changed the base branch from graphite-base/739 to export-lint-and-fmt-types March 9, 2026 08:48
@fengmk2 fengmk2 force-pushed the export-lint-and-fmt-types branch from 82abaa7 to 2d8a8db Compare March 9, 2026 08:56
@fengmk2 fengmk2 force-pushed the improve-vp-check branch from aec26b4 to a764269 Compare March 9, 2026 08:56
@fengmk2 fengmk2 marked this pull request as ready for review March 9, 2026 08:58
@fengmk2 fengmk2 requested review from cpojer and leaysgur March 9, 2026 08:59
@leaysgur leaysgur requested a review from camc314 March 9, 2026 09:07
@fengmk2 fengmk2 changed the base branch from export-lint-and-fmt-types to graphite-base/739 March 9, 2026 11:11
@fengmk2 fengmk2 force-pushed the improve-vp-check branch from a764269 to 268e38e Compare March 9, 2026 11:28
@fengmk2 fengmk2 force-pushed the graphite-base/739 branch 2 times, most recently from 9c62ad8 to 9121608 Compare March 9, 2026 11:42
@fengmk2 fengmk2 force-pushed the improve-vp-check branch from 268e38e to a2d52fd Compare March 9, 2026 11:42
@graphite-app graphite-app bot changed the base branch from graphite-base/739 to main March 9, 2026 11:42
@fengmk2 fengmk2 force-pushed the improve-vp-check branch from a2d52fd to 157d592 Compare March 9, 2026 11:42
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.
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.
@fengmk2 fengmk2 force-pushed the improve-vp-check branch from 5a4c483 to 6237268 Compare March 9, 2026 13:58
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.
@fengmk2 fengmk2 force-pushed the improve-vp-check branch from 4b5b347 to 56dfed9 Compare March 9, 2026 14:29
fengmk2 added 2 commits March 9, 2026 23:04
…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 added 3 commits March 9, 2026 23:46
…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.
Copy link
Member Author

fengmk2 commented Mar 9, 2026

Merge activity

  • Mar 9, 5:04 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 9, 5:04 PM UTC: @fengmk2 merged this pull request with Graphite.

@fengmk2 fengmk2 merged commit 189d2b3 into main Mar 9, 2026
38 checks passed
@fengmk2 fengmk2 deleted the improve-vp-check branch March 9, 2026 17:04
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants