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.
This commit is contained in:
Boshen 2024-08-26 05:23:45 +00:00
parent 2fbc283e03
commit 5946748ca6

View file

@ -256,6 +256,7 @@ impl Runtime {
) -> Vec<Message<'a>> {
let ret = Parser::new(allocator, source_text, source_type)
.with_options(ParseOptions {
parse_regular_expression: true,
allow_return_outside_function: true,
..ParseOptions::default()
})