src/language-js/printer-estree.js/hasLeadingOwnLineComment
function hasLeadingOwnLineComment(text, node, options) {
  if (isJSXNode(node)) {
    return privateUtil.hasNodeIgnoreComment(node);
  }

  const res =
    node.comments &&
    node.comments.some(
      comment =>
        comment.leading && privateUtil.hasNewline(text, options.locEnd(comment))
    );
  return res;
}