src/comments.js
function handleIfStatementComments(
  text,
  precedingNode,
  enclosingNode,
  followingNode,
  comment
) {
  if (
    !enclosingNode ||
    !(
      enclosingNode.type === 'IfStatement' ||
      enclosingNode.type === 'ConditionalExpression'
    ) ||
    !followingNode
  ) {
    return false
  }

  if (
    precedingNode === enclosingNode.consequent &&
    followingNode === enclosingNode.alternate
  ) {
    // if (precedingNode.type === 'BlockStatement') {
    //   addTrailingComment(precedingNode, comment)
    // } else {
    addDanglingComment(enclosingNode, comment)
    // }
    return true
  }

  return false
}
function handleIfStatementComments(
  text,
  precedingNode,
  enclosingNode,
  followingNode,
  comment
) {
  if (
    !enclosingNode ||
    !(
      enclosingNode.type === 'IfStatement' ||
      enclosingNode.type === 'ConditionalExpression'
    ) ||
    !followingNode
  ) {
    return false
  }

  if (
    precedingNode === enclosingNode.consequent &&
    followingNode === enclosingNode.alternate
  ) {
    // if (precedingNode.type === 'BlockStatement') {
    //   addTrailingComment(precedingNode, comment)
    // } else {
    addDanglingComment(enclosingNode, comment)
    // }
    return true
  }

  return false
}
function handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) {