src/language-js/parse/babel.js/parseWithOptions
function parseWithOptions(parseMethod, text, options) {
  // Inline the require to avoid loading all the JS if we don't use it
  /** @type {Parse} */
  const parse = require("@babel/parser")[parseMethod];
  const ast = parse(text, options);
  const error = ast.errors.find(
    (error) => !allowedMessageCodes.has(error.reasonCode)
  );
  if (error) {
    throw error;
  }
  return ast;
}