function getParentES6Component(context, node) {
  let scope = getScope(context, node);
  while (scope && scope.type !== 'class') {
    scope = scope.upper;
  }
  node = scope && scope.block;
  if (!node || !isES6Component(node, context)) {
    return null;
  }
  return node;
}
Get the parent ES6 component node from the current scope
@param {Context} context
@param {ASTNode} node
@returns {ASTNode | null}