feat: Support regex literals in JavaScript non-literal-regexp rule
- Remove false positives when passing literal regular expressions to
new RegExp(/.*my pattern.*/)
. - Improve coverage by matching
RegExp(...)
function calls rather than only constructor-style calls. - Test that literal regular expressions do not generate findings
- Test that single-quote strings do not generate findings
- Test that template strings (backtick) do generate findings
Edited by Erran Carey