feat(cli): add vp check command for format, lint, and type checks#643
Merged
feat(cli): add vp check command for format, lint, and type checks#643
vp check command for format, lint, and type checks#643Conversation
fengmk2
commented
Feb 26, 2026
97d9ad7 to
6bea302
Compare
camc314
reviewed
Feb 26, 2026
cpojer
reviewed
Feb 27, 2026
Member
cpojer
left a comment
There was a problem hiding this comment.
Super cool! Good first version.
63315d5 to
5c5fb42
Compare
cpojer
approved these changes
Feb 27, 2026
Member
Author
Merge activity
|
2338348 to
24ac4c8
Compare
Add `vp check` as a built-in composite command that runs `vp fmt --check` then `vp lint --type-aware --type-check` sequentially with fail-fast semantics. Supports `--no-fmt`, `--no-lint`, `--no-type-aware`, and `--no-type-check` flags to selectively disable checks. This is the first composite command in vite-plus — all existing built-in commands delegate to a single underlying tool.
tsgolint does not yet recognize Array#toSorted() from ES2023 lib, causing TS2550 errors under `vp check`. Both call sites sort freshly created arrays so in-place sort() is safe.
`vp check --fix` runs `vp fmt` (auto-format) then `vp lint --fix --type-aware --type-check` (auto-fix lint issues), replacing the manual `vp fmt && vp lint --fix` workflow. Also removes unused `create_install_synthetic_request` function.
Lint fixes (e.g. curly rule adding braces) can break formatting. Now `vp check --fix` runs: fmt → lint --fix → fmt, so a subsequent `vp check` always passes. Add check-fix-reformat snap test to verify the curly rule scenario.
Add trailing file path arguments to `vp check` so lint-staged can pass staged files directly (e.g., `vp check --fix src/a.ts src/b.ts`). When paths are provided: - fmt receives `--no-error-on-unmatched-pattern` + paths - lint receives paths directly - The post-lint reformat step also receives the same flags Simplify lint-staged config from two separate commands to a single `vp check --fix`.
24ac4c8 to
9cbf5b3
Compare
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.

Add
vp checkas a built-in composite command that runsvp fmt --checkthen
vp lint --type-aware --type-checksequentially with fail-fastsemantics. Supports
--no-fmt,--no-lint,--no-type-aware, and--no-type-checkflags to selectively disable checks.This is the first composite command in vite-plus — all existing built-in
commands delegate to a single underlying tool.