src/language-js/print/jsx.js/printJsxExpressionContainer
function printJsxExpressionContainer(path, options, print) {
  const node = path.getValue();

  const shouldInline = (node, parent) =>
    node.type === "JSXEmptyExpression" ||
    (!hasComment(node) &&
      (node.type === "ArrayExpression" ||
        node.type === "ObjectExpression" ||
        node.type === "ArrowFunctionExpression" ||
        (node.type === "AwaitExpression" &&
          (shouldInline(node.argument, node) ||
            node.argument.type === "JSXElement")) ||
        isCallExpression(node) ||
        node.type === "FunctionExpression" ||
        node.type === "TemplateLiteral" ||
        node.type === "TaggedTemplateExpression" ||
        node.type === "DoExpression" ||
        (isJsxNode(parent) &&
          (node.type === "ConditionalExpression" || isBinaryish(node)))));

  if (shouldInline(node.expression, path.getParentNode(0))) {
    return group(["{", print("expression"), lineSuffixBoundary, "}"]);
  }

  return group([
    "{",
    indent([softline, print("expression")]),
    softline,
    lineSuffixBoundary,
    "}",
  ]);
}