src/language-js/printer-estree.js/printOptionalToken
function printOptionalToken(path) {
  const node = path.getValue();
  if (!node.optional) {
    return "";
  }
  if (
    node.type === "CallExpression" ||
    (node.type === "MemberExpression" && node.computed)
  ) {
    return "?.";
  }
  return "?";
}