aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jest.config.js2
-rw-r--r--setupTests.js18
-rw-r--r--webpack.config.js26
3 files changed, 22 insertions, 24 deletions
diff --git a/jest.config.js b/jest.config.js
index ffc58e1d..cc8d038e 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -9,4 +9,4 @@ module.exports = {
},
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/setupTests.js']
-};
+}
diff --git a/setupTests.js b/setupTests.js
index 5f1e97dd..1b4e29f8 100644
--- a/setupTests.js
+++ b/setupTests.js
@@ -1,14 +1,14 @@
-import '@testing-library/jest-dom';
+import '@testing-library/jest-dom'
window.matchMedia = window.matchMedia || function() {
return {
matches: true,
media: '',
- addListener: function() { return true; },
- removeListener: function() { return true; },
- addEventListener: function() { return true; },
- removeEventListener: function() { return true; },
- dispatchEvent: function() { return true; },
- onchange: function() { return true; }
- };
-};
+ addListener: function() { return true },
+ removeListener: function() { return true },
+ addEventListener: function() { return true },
+ removeEventListener: function() { return true },
+ dispatchEvent: function() { return true },
+ onchange: function() { return true }
+ }
+}
diff --git a/webpack.config.js b/webpack.config.js
index 87483ead..d362c06f 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,12 +1,10 @@
-/* eslint-disable @typescript-eslint/no-var-requires */
-
-const ESLintPlugin = require('eslint-webpack-plugin');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const TerserPlugin = require('terser-webpack-plugin');
+const ESLintPlugin = require('eslint-webpack-plugin')
+const MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const TerserPlugin = require('terser-webpack-plugin')
module.exports = () => {
- const node_env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
- const dev = node_env !== 'production';
+ const node_env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'
+ const dev = node_env !== 'production'
const config = {
mode: node_env,
devtool: dev ? 'source-map' : false,
@@ -70,7 +68,7 @@ module.exports = () => {
symlinks: false,
extensions: ['.js']
}
- };
+ }
if (dev) {
config.devServer = {
hot: true,
@@ -80,7 +78,7 @@ module.exports = () => {
runtimeErrors: true
}
}
- };
+ }
config.plugins.push(
new ESLintPlugin({
files: 'src/main/assets',
@@ -88,9 +86,9 @@ module.exports = () => {
failOnWarning: false,
failOnError: true,
fix: false
- }));
+ }))
} else {
- config.plugins.push(new MiniCssExtractPlugin({ filename: 'style.css' }));
+ config.plugins.push(new MiniCssExtractPlugin({ filename: 'style.css' }))
}
config.optimization = {
minimize: !dev,
@@ -102,6 +100,6 @@ module.exports = () => {
terserOptions: {},
}),
]
- };
- return config;
-};
+ }
+ return config
+}