<commit_before>const r = m => require.resolve(m)

function preset(context, options = {}) {
  const { browser = false, debug = false } = options
  const { NODE_ENV, BABEL_ENV } = process.env

  const PRODUCTION = (BABEL_ENV || NODE_ENV) === "production"

  const browserConfig = {
    useBuiltIns: false,
    targets: {
      browsers: PRODUCTION
        ? [`last 4 versions`, `safari >= 7`, "ie >= 9"]
        : [`last 2 versions`, `not ie <= 11`, `not android 4.4.3`],
    },
  }

  const nodeConfig = {
    targets: {
      node: PRODUCTION ? 4.0 : "current",
    },
  }

  return {
    presets: [
      [
        r("@babel/preset-env"),
        Object.assign(
          {
            loose: true,
            debug: !!debug,
            useBuiltIns: "entry",
            shippedProposals: true,
            sourceType: "unambiguous",
            modules: "commonjs",
          },
          browser ? browserConfig : nodeConfig
        ),
      ],
      [r("@babel/preset-react"), { development: !PRODUCTION }],
      r("@babel/preset-flow"),
    ],
    plugins: [
      r("@babel/plugin-proposal-class-properties"),
      [
        r("@babel/plugin-transform-runtime"),
        {
          // we are only polyfilling the node environment
          // so we need to enable the runtime replacements for the browser preset
          polyfill: !!browser,
        },
      ],
    ],
  }
}

module.exports = preset<commit_msg>Disable loading user's babelrc files since we do that ourselves (#3963)<commit_after>const r = m => require.resolve(m)

function preset(context, options = {}) {
  const { browser = false, debug = false } = options
  const { NODE_ENV, BABEL_ENV } = process.env

  const PRODUCTION = (BABEL_ENV || NODE_ENV) === "production"

  const browserConfig = {
    useBuiltIns: false,
    targets: {
      browsers: PRODUCTION
        ? [`last 4 versions`, `safari >= 7`, "ie >= 9"]
        : [`last 2 versions`, `not ie <= 11`, `not android 4.4.3`],
    },
  }

  const nodeConfig = {
    targets: {
      node: PRODUCTION ? 4.0 : "current",
    },
  }

  return {
    presets: [
      [
        r("@babel/preset-env"),
        Object.assign(
          {
            loose: true,
            debug: !!debug,
            useBuiltIns: "entry",
            shippedProposals: true,
            sourceType: "unambiguous",
            modules: "commonjs",
          },
          browser ? browserConfig : nodeConfig
        ),
      ],
      [r("@babel/preset-react"), { development: !PRODUCTION }],
      r("@babel/preset-flow"),
    ],
    plugins: [
      r("@babel/plugin-proposal-class-properties"),
      [
        r("@babel/plugin-transform-runtime"),
        {
          // we are only polyfilling the node environment
          // so we need to enable the runtime replacements for the browser preset
          polyfill: !!browser,
        },
      ],
    ],
    babelrc: false,
  }
}

module.exports = preset
{'fraction_non_alphanumeric': 0.13953488372093023, 'fraction_numerical': 0.008891928864569083, 'mean_word_length': 1.933801404212638, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6091373', 'n_tokens_mistral': 935, 'n_tokens_neox': 888, 'n_words': 213}