no-invalid-regexp: Validate flags even for non-literal patterns #16573
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
Projects
Hi,
The
no-invalid-regexp
rule skips flag validation for regexps with non-literal pattern.I believe that flags should be validated no matter what the pattern is.
What rule do you want to change?
no-invalid-regexp
What change to do you want to make?
Generate more warnings
How do you think the change should be implemented?
A new default behavior
Example code
What does the rule currently do for this code?
The rule skips flag validation and reports no issues.
What will the rule do after it's changed?
The rule should IMO report invalid flag.
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: