Skip to content

Commit 4c1d060

Browse files
committed
feat(cli): add --no-type-check flag to check subcommand
1 parent d711b23 commit 4c1d060

5 files changed

Lines changed: 10 additions & 0 deletions

File tree

crates/vite_global_cli/src/help.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ fn delegated_help_doc(command: &str) -> Option<HelpDoc> {
761761
row("--fix", "Auto-fix format and lint issues"),
762762
row("--no-fmt", "Skip format check"),
763763
row("--no-lint", "Skip lint check"),
764+
row("--no-type-check", "Skip type check"),
764765
row(
765766
"--no-error-on-unmatched-pattern",
766767
"Do not exit with error when pattern is unmatched",

packages/cli/binding/src/check/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub(crate) async fn execute_check(
2222
fix: bool,
2323
no_fmt: bool,
2424
no_lint: bool,
25+
_no_type_check: bool,
2526
no_error_on_unmatched_pattern: bool,
2627
paths: Vec<String>,
2728
envs: &Arc<FxHashMap<Arc<OsStr>, Arc<OsStr>>>,

packages/cli/binding/src/cli/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ async fn execute_direct_subcommand(
6767
fix,
6868
no_fmt,
6969
no_lint,
70+
no_type_check,
7071
no_error_on_unmatched_pattern,
7172
paths,
7273
} => {
@@ -75,6 +76,7 @@ async fn execute_direct_subcommand(
7576
fix,
7677
no_fmt,
7778
no_lint,
79+
no_type_check,
7880
no_error_on_unmatched_pattern,
7981
paths,
8082
&envs,

packages/cli/binding/src/cli/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ pub enum SynthesizableSubcommand {
9393
/// Skip lint check
9494
#[arg(long = "no-lint")]
9595
no_lint: bool,
96+
/// Skip type check
97+
#[arg(long = "no-type-check")]
98+
no_type_check: bool,
9699
/// Do not exit with error when pattern is unmatched
97100
#[arg(long = "no-error-on-unmatched-pattern")]
98101
no_error_on_unmatched_pattern: bool,

packages/cli/snap-tests-global/command-check-help/snap.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Options:
99
--fix Auto-fix format and lint issues
1010
--no-fmt Skip format check
1111
--no-lint Skip lint check
12+
--no-type-check Skip type check
1213
--no-error-on-unmatched-pattern Do not exit with error when pattern is unmatched
1314
-h, --help Print help
1415

@@ -31,6 +32,7 @@ Options:
3132
--fix Auto-fix format and lint issues
3233
--no-fmt Skip format check
3334
--no-lint Skip lint check
35+
--no-type-check Skip type check
3436
--no-error-on-unmatched-pattern Do not exit with error when pattern is unmatched
3537
-h, --help Print help
3638

@@ -53,6 +55,7 @@ Options:
5355
--fix Auto-fix format and lint issues
5456
--no-fmt Skip format check
5557
--no-lint Skip lint check
58+
--no-type-check Skip type check
5659
--no-error-on-unmatched-pattern Do not exit with error when pattern is unmatched
5760
-h, --help Print help
5861

0 commit comments

Comments
 (0)