code: function checkFunction(node) {
              const scope = context.getScope();
              const regExpVar = astUtils.getVariableByName(scope, "RegExp");
              const shadowed = regExpVar && regExpVar.defs.length > 0;
  
              if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0]) && !shadowed) {
                  checkRegex(node, node.arguments[0].value, node.arguments[0].range[0] + 1);
              }
          }
docs: Validate strings passed to the RegExp constructor
  @param {ASTNode} node node to validate
  @returns {void}
  @private