Skip to content

feat: Support regex literals in JavaScript non-literal-regexp rule

  1. Remove false positives when passing literal regular expressions to new RegExp(/.*my pattern.*/).
  2. Improve coverage by matching RegExp(...) function calls rather than only constructor-style calls.
  3. Test that literal regular expressions do not generate findings
  4. Test that single-quote strings do not generate findings
  5. Test that template strings (backtick) do generate findings
Edited by Erran Carey

Merge request reports

Loading