diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 16f94529eaf..00000000000 --- a/.babelrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "14", - "chrome": "61", - "safari": "11.3", - "firefox": "60", - "edge": "79" - } - } - ], - "@babel/preset-typescript", - ["@babel/preset-react", {"runtime": "automatic"}] - ], - "plugins": ["@babel/plugin-proposal-class-properties"] -} diff --git a/babel.config.cjs b/babel.config.cjs deleted file mode 100644 index 2803b284656..00000000000 --- a/babel.config.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -/* eslint-disable no-sync */ - -const fs = require('fs') -const path = require('path') - -const babelrc = JSON.parse(fs.readFileSync(path.join(__dirname, '.babelrc'), 'utf8')) - -module.exports = { - ...babelrc, - babelrcRoots: ['.', ...require('./lerna.json').packages], -} diff --git a/test/config.cjs b/test/config.cjs index 0b6fdd3ac3c..bf33dc3e5a6 100644 --- a/test/config.cjs +++ b/test/config.cjs @@ -73,8 +73,29 @@ exports.createJestConfig = function createJestConfig( ...transform, '\\.[jt]sx?$': [ 'babel-jest', - // rootMode upwards makes use of the global babel.config.js - {rootMode: 'upward'}, + { + // Don't look for babel.config.{ts,js,json} files or .babelrc files + configFile: false, + babelrc: false, + // The rest is only needed by Jest, if Jest is updated to no longer need babel then this can be removed as well as related dependencies + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: '14', + chrome: '61', + safari: '11.3', + firefox: '60', + edge: '79', + }, + }, + ], + '@babel/preset-typescript', + ['@babel/preset-react', {runtime: 'automatic'}], + ], + plugins: ['@babel/plugin-proposal-class-properties'], + }, ], }, snapshotFormat: {