code: function toTernary(path) {
      const { node } = path;
      if (
        t.isExpressionStatement(node.consequent) &&
        t.isExpressionStatement(node.alternate)
      ) {
        path.replaceWith(
          t.conditionalExpression(
            node.test,
            node.consequent.expression,
            node.alternate.expression
          )
        );
        return REPLACED;
      }
    }
docs: both consequent and alternate are expressions, turn into ternary