function checkUnsafe(node, method) {
      if (!isUnsafe(method)) {
        return;
      }

      const meta = unsafe[method];
      const newMethod = meta.newMethod;
      const details = meta.details;

      const propertyNode = astUtil.getComponentProperties(node)
        .find((property) => astUtil.getPropertyName(property) === method);

      report(context, messages.unsafeMethod, 'unsafeMethod', {
        node: propertyNode,
        data: {
          method,
          newMethod,
          details,
        },
      });
    }
Reports the error for an unsafe method
@param {ASTNode} node The AST node being checked
@param {string} method Life cycle method