src/main/comments.js/printLeadingComment
function printLeadingComment(commentPath, print, options) {
  const comment = commentPath.getValue();
  const contents = printComment(commentPath, options);
  if (!contents) {
    return "";
  }
  const isBlock = privateUtil.isBlockComment(comment);

  // Leading block comments should see if they need to stay on the
  // same line or not.
  if (isBlock) {
    return concat([
      contents,
      privateUtil.hasNewline(options.originalText, options.locEnd(comment))
        ? hardline
        : " "
    ]);
  }

  return concat([contents, hardline]);
}