Skip to content

Commit

Permalink
refactor: move babel config to jest config (#5562)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored and ricokahler committed Jan 26, 2024
1 parent 088830d commit fa3bf84
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 34 deletions.
19 changes: 0 additions & 19 deletions .babelrc

This file was deleted.

13 changes: 0 additions & 13 deletions babel.config.cjs

This file was deleted.

25 changes: 23 additions & 2 deletions test/config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit fa3bf84

Please sign in to comment.