src/language-js/printer-estree.js/shouldGroupLastArg
function shouldGroupLastArg(args) {
  const lastArg = privateUtil.getLast(args);
  const penultimateArg = privateUtil.getPenultimate(args);
  return (
    !hasLeadingComment(lastArg) &&
    !hasTrailingComment(lastArg) &&
    couldGroupArg(lastArg) &&
    // If the last two arguments are of the same type,
    // disable last element expansion.
    (!penultimateArg || penultimateArg.type !== lastArg.type)
  );
}