From 0d4e33d47798af55d62e729130983ec3818bb52c Mon Sep 17 00:00:00 2001 From: Boshen Date: Mon, 26 Aug 2024 13:17:50 +0800 Subject: [PATCH] feat(linter)!: parse and display syntax errors for regular expressions --- crates/oxc_linter/src/service.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/oxc_linter/src/service.rs b/crates/oxc_linter/src/service.rs index caa5251c6f7ee1..c54cacf2c6c1fd 100644 --- a/crates/oxc_linter/src/service.rs +++ b/crates/oxc_linter/src/service.rs @@ -256,6 +256,7 @@ impl Runtime { ) -> Vec> { let ret = Parser::new(allocator, source_text, source_type) .with_options(ParseOptions { + parse_regular_expression: true, allow_return_outside_function: true, ..ParseOptions::default() })