From b2cb2fa468ab61eda9c869186f1d38e04c209721 Mon Sep 17 00:00:00 2001 From: Dunqing <29533304+Dunqing@users.noreply.github.com> Date: Thu, 26 Jun 2025 03:12:14 +0000 Subject: [PATCH] chore(formatter): align parser options of example with prettier conformance (#11905) Keep them as the same, so that it wouldn't confuse you. https://github.com/oxc-project/oxc/blob/36d5a795f053662238eead81021efad4ed0bf332/tasks/prettier_conformance/src/lib.rs#L423-L429 --- crates/oxc_formatter/examples/formatter.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/oxc_formatter/examples/formatter.rs b/crates/oxc_formatter/examples/formatter.rs index 21cfddebf3bf8..7529da96f079a 100644 --- a/crates/oxc_formatter/examples/formatter.rs +++ b/crates/oxc_formatter/examples/formatter.rs @@ -17,7 +17,11 @@ fn main() -> Result<(), String> { let source_type = SourceType::from_path(path).unwrap(); let allocator = Allocator::new(); let ret = Parser::new(&allocator, &source_text, source_type) - .with_options(ParseOptions { parse_regular_expression: true, ..ParseOptions::default() }) + .with_options(ParseOptions { + preserve_parens: false, + allow_v8_intrinsics: true, + ..ParseOptions::default() + }) .parse(); for error in ret.errors {