lib/util/Components.js
function () {
      let scope = context.getScope();
      while (scope) {
        const node = scope.block && scope.block.parent && scope.block.parent.parent;
        if (node && utils.isES5Component(node)) {
          return node;
        }
        scope = scope.upper;
      }
      return null;
    }
function () {
      let scope = context.getScope();
      while (scope) {
        const node = scope.block && scope.block.parent && scope.block.parent.parent;
        if (node && utils.isES5Component(node)) {
          return node;
        }
        scope = scope.upper;
      }
      return null;
    }
function ( ) { let scope = context . getScope ( ) ; while ( scope ) { const node = scope . block && scope . block . parent && scope . block . parent . parent ; if ( node && utils . isES5Component ( node ) ) { return node ; } scope = scope . upper ; } return null ; }
Get the parent ES5 component node from the current scope

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