lib/util/Components.js
function () {
      let scope = context.getScope();
      while (scope && scope.type !== 'class') {
        scope = scope.upper;
      }
      const node = scope && scope.block;
      if (!node || !utils.isES6Component(node)) {
        return null;
      }
      return node;
    }
function () {
      let scope = context.getScope();
      while (scope && scope.type !== 'class') {
        scope = scope.upper;
      }
      const node = scope && scope.block;
      if (!node || !utils.isES6Component(node)) {
        return null;
      }
      return node;
    }
function ( ) { let scope = context . getScope ( ) ; while ( scope && scope . type !== 'class' ) { scope = scope . upper ; } const node = scope && scope . block ; if ( ! node || ! utils . isES6Component ( node ) ) { return null ; } return node ; }
Get the parent ES6 component node from the current scope

@returns {ASTNode} component node, null if we are not in a component
Get the parent ES6 component node from the current scope