From e434ebd5eb22fd53ec4eb1f60ef23dd7bde9f526 Mon Sep 17 00:00:00 2001 From: Mahmo <2393401k@student.gla.ac.uk> Date: Sat, 14 Mar 2026 16:07:57 +0000 Subject: [PATCH 1/2] fix(help): replace stale `--no-type-check` example in `vp check` help The `--no-type-check` flag was removed from `vp check` in #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) --- crates/vite_global_cli/src/help.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vite_global_cli/src/help.rs b/crates/vite_global_cli/src/help.rs index a12a9bffa8..c23287a28e 100644 --- a/crates/vite_global_cli/src/help.rs +++ b/crates/vite_global_cli/src/help.rs @@ -767,7 +767,7 @@ fn delegated_help_doc(command: &str) -> Option { vec![ " vp check", " vp check --fix", - " vp check --no-type-check src/index.ts", + " vp check --no-lint src/index.ts", ], ), ], From 831ed99bf1fd0d6e429c9b60b3cb0cee5e131da3 Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 16 Mar 2026 15:22:25 +0800 Subject: [PATCH 2/2] fix: apply cargo fmt and add snap test for vp check help --- crates/vite_global_cli/src/help.rs | 6 +- .../command-check-help/snap.txt | 62 +++++++++++++++++++ .../command-check-help/steps.json | 3 + 3 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 packages/cli/snap-tests-global/command-check-help/snap.txt create mode 100644 packages/cli/snap-tests-global/command-check-help/steps.json diff --git a/crates/vite_global_cli/src/help.rs b/crates/vite_global_cli/src/help.rs index c23287a28e..88d01f3873 100644 --- a/crates/vite_global_cli/src/help.rs +++ b/crates/vite_global_cli/src/help.rs @@ -764,11 +764,7 @@ fn delegated_help_doc(command: &str) -> Option { ), section_lines( "Examples", - vec![ - " vp check", - " vp check --fix", - " vp check --no-lint src/index.ts", - ], + vec![" vp check", " vp check --fix", " vp check --no-lint src/index.ts"], ), ], documentation_url: documentation_url_for_command_path(&["check"]), diff --git a/packages/cli/snap-tests-global/command-check-help/snap.txt b/packages/cli/snap-tests-global/command-check-help/snap.txt new file mode 100644 index 0000000000..acfb446b24 --- /dev/null +++ b/packages/cli/snap-tests-global/command-check-help/snap.txt @@ -0,0 +1,62 @@ +> vp check -h +VITE+ - The Unified Toolchain for the Web + +Usage: vp check [OPTIONS] [PATHS]... + +Run format, lint, and type checks. + +Options: + --fix Auto-fix format and lint issues + --no-fmt Skip format check + --no-lint Skip lint check + -h, --help Print help + +Examples: + vp check + vp check --fix + vp check --no-lint src/index.ts + +Documentation: https://viteplus.dev/guide/check + + +> vp check --help +VITE+ - The Unified Toolchain for the Web + +Usage: vp check [OPTIONS] [PATHS]... + +Run format, lint, and type checks. + +Options: + --fix Auto-fix format and lint issues + --no-fmt Skip format check + --no-lint Skip lint check + -h, --help Print help + +Examples: + vp check + vp check --fix + vp check --no-lint src/index.ts + +Documentation: https://viteplus.dev/guide/check + + +> vp help check +VITE+ - The Unified Toolchain for the Web + +Usage: vp check [OPTIONS] [PATHS]... + +Run format, lint, and type checks. + +Options: + --fix Auto-fix format and lint issues + --no-fmt Skip format check + --no-lint Skip lint check + -h, --help Print help + +Examples: + vp check + vp check --fix + vp check --no-lint src/index.ts + +Documentation: https://viteplus.dev/guide/check + diff --git a/packages/cli/snap-tests-global/command-check-help/steps.json b/packages/cli/snap-tests-global/command-check-help/steps.json new file mode 100644 index 0000000000..9278048f58 --- /dev/null +++ b/packages/cli/snap-tests-global/command-check-help/steps.json @@ -0,0 +1,3 @@ +{ + "commands": ["vp check -h", "vp check --help", "vp help check"] +}