src/language-js/printer-estree.js/shouldHugArguments
function shouldHugArguments(fun) {
  if (!fun || fun.rest) {
    return false;
  }
  const params = fun.params || fun.parameters;
  if (!params || params.length !== 1) {
    return false;
  }
  const param = params[0];
  return (
    !param.comments &&
    (param.type === "ObjectPattern" ||
      param.type === "ArrayPattern" ||
      (param.type === "Identifier" &&
        param.typeAnnotation &&
        (param.typeAnnotation.type === "TypeAnnotation" ||
          param.typeAnnotation.type === "TSTypeAnnotation") &&
        isObjectType(param.typeAnnotation.typeAnnotation)) ||
      (param.type === "FunctionTypeParam" &&
        isObjectType(param.typeAnnotation)) ||
      (param.type === "AssignmentPattern" &&
        (param.left.type === "ObjectPattern" ||
          param.left.type === "ArrayPattern") &&
        (param.right.type === "Identifier" ||
          (param.right.type === "ObjectExpression" &&
            param.right.properties.length === 0) ||
          (param.right.type === "ArrayExpression" &&
            param.right.elements.length === 0))))
  );
}