src/language-js/utils.js/getComments
function getComments(node, flags, fn) {
  if (!node || !Array.isArray(node.comments)) {
    return [];
  }
  const test = getCommentTestFunction(flags, fn);
  return test
    ? node.comments.filter((comment, index, comments) =>
        test(comment, index, comments)
      )
    : node.comments;
}