Check that an arrow function is not annotated with {@constructor}.
183004
private void validateArrowFunction(Node n) {
    if (n.isArrowFunction()) {
      JSDocInfo info = NodeUtil.getBestJSDocInfo(n);
      if (info != null && info.isConstructorOrInterface()) {
        report(n, ARROW_FUNCTION_AS_CONSTRUCTOR);
      }
    }
  }
691000
function Hidden(props) {
  const { implementation, ...other } = props;

  if (implementation === 'js') {
    return <HiddenJs {...other} />;
  }

  return <HiddenCss {...other} />;
}
910154
function isReactComponent(instance, error) {
            /* disable-eslint no-underscore-dangle */
            if (!(instance && instance.$$typeof)) {
                if (error) {
                    throw new Error("Given component is not a react component ! Component :" + instance);
                }
                return false;
            }
            return true;
        }
723849
function isDefined(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && value === undefined) {
        throw TypeException.expectedType(assertionTypes.IS_DEFINED, value, '<undefined>', message, id);
    }
}
1260815
function NotFoundError(message) {
  Error.call(this);
  Error.captureStackTrace(this, this.constructor);

  this.status = 404;
  this.message = 'Not Found: ' + message;
  this.name = this.constructor.name;
}
917919
function(key, type, validKeys, raw) {
    return {
      title: 'Annotation ' + chalk.underline('@' + key) +
        ' not allowed for type ' + type + ' of ' + chalk.underline(raw.descriptor) + ' in ' + raw.file,
      text: 'Valid annotations are @' + validKeys.join(', @') + '. This element will not appear in the final StyleGuide until you fix this error.'
    };
  }
349532
function checkFunction(node) {
            const functionConfig = getConfigForFunction(node);

            if (functionConfig === "ignore") {
                return;
            }

            const rightToken = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
            const leftToken = sourceCode.getTokenBefore(rightToken);
            const hasSpacing = sourceCode.isSpaceBetweenTokens(leftToken, rightToken);

            if (hasSpacing && functionConfig === "never") {
                context.report({
                    node,
                    loc: leftToken.loc.end,
                    message: "Unexpected space before function parentheses.",
                    fix: fixer => fixer.removeRange([leftToken.range[1], rightToken.range[0]])
                });
            } else if (!hasSpacing && functionConfig === "always") {
                context.report({
                    node,
                    loc: leftToken.loc.end,
                    message: "Missing space before function parentheses.",
                    fix: fixer => fixer.insertTextAfter(leftToken, " ")
                });
            }
        }
1135712
function assertAsDefined(obj, errorMsg) {
  if (_.isUndefined(obj) || _.isNull(obj)) {
    throw new Error(errorMsg);
  }
}
446816
function checkDecorator(decorator, value, node) {
      const decoratorLine = decorator.loc.start.line;
      const decoratorColumn = decorator.loc.end.column;
      const valueLine = value.loc.start.line;

      if (config === 'always') {
        if (decoratorLine === valueLine) {
          context.report({
            node,
            loc: { line: decoratorLine, column: decoratorColumn },
            message: ALWAYS_MESSAGE,
          });
        }
      } else {
        if (decoratorLine !== valueLine) { // eslint-disable-line
          context.report({
            node,
            loc: { line: decoratorLine, column: decoratorColumn },
            message: NEVER_MESSAGE,
          });
        }
      }
    }
261158
function (Handler, name) {
        if (!_.isFunction(Handler.init)) {
            throw new Error('The handler for "' + name + '" does not have an "init" function, which is necessary');
        }

        if (!_.isFunction(Handler.pre)) {
            throw new Error('The handler for "' + name + '" does not have a "pre" function, which is necessary');
        }

        if (!_.isFunction(Handler.post)) {
            throw new Error('The handler for "' + name + '" does not have a "post" function, which is necessary');
        }

        if (!_.isFunction(Handler.sign)) {
            throw new Error('The handler for "' + name + '" does not have a "sign" function, which is necessary');
        }

        Object.defineProperty(Handler, AUTH_TYPE_PROP, {
            value: name,
            configurable: false,
            enumerable: false,
            writable: false
        });

        AuthLoader.handlers[name] = Handler;
    }
671738
function at_method(isConstructor) {
  if (isConstructor) {
    match(/@constructor\b/);
    add_tag("method");
    add_tag("Constructor");
    skip_white();
  }
  else {
    match(/@method/);
    add_tag("method");
    maybe_name();
    skip_white();
  }
}
648700
function isReactClass (node) {
    if (!node || !t.isCallExpression(node)) return false

    // not _createClass call
    if (!node.callee || node.callee.name !== '_createClass') return false

    // no call arguments
    const args = node.arguments
    if (!args || args.length !== 2) return false
    if (!t.isIdentifier(args[0])) return false
    if (!t.isArrayExpression(args[1])) return false

    // no render method
    if (!args[1].elements || !args[1].elements.some((el) => {
      return isRenderMethod(el.properties)
    })) return false

    return true
  }
1183010
function isFunctor(x) {
    return x && x.map && (0, _object.instanceOf)(Function, x.map);
  }
477119
private void checkForHosedThisReferences(Node function, JSDocInfo docInfo,
      final Name name) {
    // A function is getting collapsed. Make sure that if it refers to "this",
    // it must be a constructor, interface, record, arrow function, or documented with @this.
    boolean isAllowedToReferenceThis =
        (docInfo != null && (docInfo.isConstructorOrInterface() || docInfo.hasThisType()))
        || function.isArrowFunction();
    if (!isAllowedToReferenceThis) {
      NodeTraversal.traverse(compiler, function.getLastChild(),
          new NodeTraversal.AbstractShallowCallback() {
            @Override
            public void visit(NodeTraversal t, Node n, Node parent) {
              if (n.isThis()) {
                compiler.report(
                    JSError.make(n, UNSAFE_THIS, name.getFullName()));
              }
            }
          });
    }
  }
133307
function getConstructorClassCheck(obj) {
    var ctorStr = String(obj);
    return function(obj) {
      return String(obj.constructor) === ctorStr;
    };
  }
1238210
private void checkConstructor(Node n, FunctionType functionType) {
    FunctionType baseConstructor = functionType.getSuperClassConstructor();
    if (!Objects.equals(baseConstructor, getNativeType(OBJECT_FUNCTION_TYPE))
        && baseConstructor != null
        && baseConstructor.isInterface()) {
      // Warn if a class extends an interface.
      compiler.report(
          JSError.make(n, CONFLICTING_EXTENDED_TYPE, "constructor", getBestFunctionName(n)));
    } else {
      if (n.isFunction()
          && baseConstructor != null
          && baseConstructor.getSource() != null
          && baseConstructor.getSource().isEs6Class()
          && !functionType.getSource().isEs6Class()) {
        // Warn if an ES5 class extends an ES6 class.
        compiler.report(
            JSError.make(
                n,
                ES5_CLASS_EXTENDING_ES6_CLASS,
                functionType.getDisplayName(),
                baseConstructor.getDisplayName()));
      }

      // Warn if any interface property is missing or incorrect
      for (JSType baseInterface : functionType.getImplementedInterfaces()) {
        boolean badImplementedType = false;
        ObjectType baseInterfaceObj = ObjectType.cast(baseInterface);
        if (baseInterfaceObj != null) {
          FunctionType interfaceConstructor =
              baseInterfaceObj.getConstructor();
          if (interfaceConstructor != null && !interfaceConstructor.isInterface()) {
            badImplementedType = true;
          }
        } else {
          badImplementedType = true;
        }
        if (badImplementedType) {
          report(n, BAD_IMPLEMENTED_TYPE, getBestFunctionName(n));
        }
      }
      // check properties
      validator.expectAllInterfaceProperties(n, functionType);
      if (!functionType.isAbstract()) {
        validator.expectAbstractMethodsImplemented(n, functionType);
      }
    }
  }
218955
function not(pred, thisArg) {
    function notPred() {
        return !(notPred.pred.apply(notPred.thisArg, arguments));
    }
    notPred.pred = pred;
    notPred.thisArg = thisArg;
    return notPred;
}