Skip to content

tools: add unescaped regexp dot rule to linter

This adds a custom rule to the linter that checks for unescaped "literal" dots in regular expressions. For regexp literals this is straightforward, but it's trickier for RegExp() usage because of possible variable text passed to the constructor. This rule tries its best in the constructor scenario by concatenating any/all of the string literals passed to it and checking that.

CI: https://ci.nodejs.org/job/node-test-pull-request/6825/

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)
  • tools
  • test

Merge request reports

Loading