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

  const shouldInline =
    n.expression.type === "JSXEmptyExpression" ||
    (!hasComment(n.expression) &&
      (n.expression.type === "ArrayExpression" ||
        n.expression.type === "ObjectExpression" ||
        n.expression.type === "ArrowFunctionExpression" ||
        n.expression.type === "CallExpression" ||
        n.expression.type === "OptionalCallExpression" ||
        n.expression.type === "FunctionExpression" ||
        n.expression.type === "TemplateLiteral" ||
        n.expression.type === "TaggedTemplateExpression" ||
        n.expression.type === "DoExpression" ||
        (isJSXNode(parent) &&
          (n.expression.type === "ConditionalExpression" ||
            isBinaryish(n.expression)))));

  if (shouldInline) {
    return group(
      concat(["{", path.call(print, "expression"), lineSuffixBoundary, "}"])
    );
  }

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