From 5946748ca6876bdbbbaba0d69c366d632a7f44c5 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:23:45 +0000 Subject: [PATCH] feat(linter)!: parse and display syntax errors for regular expressions (#5214) cc @leaysgur shipping to production! This is marked as breaking change because there may be false positives. --- 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 caa5251c6..c54cacf2c 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() })