Skip to content

Commit

Permalink
All of lint, jest and webpack are happy
Browse files Browse the repository at this point in the history
  • Loading branch information
bjacobel committed May 14, 2024
1 parent 57c63b9 commit 11ac5e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
7 changes: 1 addition & 6 deletions app/babel.config.js → app/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ module.exports = api => ({
modules: api.env('test') ? 'commonjs' : false,
},
],
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
['@babel/preset-react', { runtime: 'automatic' }],
'@babel/preset-typescript',
'@wyw-in-js',
],
Expand Down
4 changes: 3 additions & 1 deletion app/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path'); // eslint-disable-line

const esmDependencies = ['wouter', '@micro-sentry/core', '@micro-sentry/breadcrumbs-plugin'];

module.exports = {
Expand All @@ -10,5 +12,5 @@ module.exports = {
url: 'http://localhost',
},
transformIgnorePatterns: [`/node_modules/(?!(${esmDependencies.join('|')}))`],
transform: { '\\.[jt]sx?$': ['babel-jest', { rootMode: 'upward' }] },
transform: { '\\.[jt]sx?$': ['babel-jest', { configFile: path.join(__dirname, '.babelrc.js') }] },
};
5 changes: 1 addition & 4 deletions app/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ export default (env: Record<string, unknown> = {}, { mode }: { mode?: string } =
test: /\.[jt]sx?$/,
include: path.join(__dirname, 'src'),
use: [
'babel-loader',
{
loader: '@wyw-in-js/webpack-loader',
options: {
sourceMap: !isProd,
},
},
{
loader: 'babel-loader',
options: { root: __dirname, rootMode: 'upward' },
},
],
},
{
Expand Down

0 comments on commit 11ac5e1

Please sign in to comment.