src/language-js/utils.js/hasComment
function hasComment(node, flags, fn) {
  if (!node || !Array.isArray(node.comments) || node.comments.length === 0) {
    return false;
  }
  const test = getCommentTestFunction(flags, fn);
  return test
    ? node.comments.some((comment, index, comments) =>
        test(comment, index, comments)
      )
    : true;
}