src/language-js/parse/json.js/createJsonParse
function createJsonParse(options = {}) {
  const { allowComments = true } = options;

  return function parse(text /*, parsers, options*/) {
    const { parseExpression } = require("@babel/parser");
    let ast;
    try {
      ast = parseExpression(text, {
        tokens: true,
        ranges: true,
      });
    } catch (error) {
      throw createBabelParseError(error);
    }

    // @ts-expect-error
    if (!allowComments && isNonEmptyArray(ast.comments)) {
      // @ts-expect-error
      throw createJsonError(ast.comments[0], "Comment");
    }

    assertJsonNode(ast);

    return ast;
  };
}