function getJSXElementAncestors(node) {
      /** @type {ASTNode[]} */
      const ancestors = [];

      let current = node;
      while (current) {
        if (current.type === 'JSXElement') {
          ancestors.push(current);
        }

        current = current.parent;
      }

      return ancestors;
    }
Gets all JSXElement ancestor nodes for the given node
@param {ASTNode} node
@returns {ASTNode[]}