From 57dc4e9481f33b35dcc792108f1712317a78c2ec Mon Sep 17 00:00:00 2001 From: Ben Heidemann Date: Sun, 21 Mar 2021 13:51:53 +0000 Subject: [PATCH] chore: fix linting issues --- tests/setup-mocha.js | 4 +- tests/webpack.config.js | 104 ++++++++++++++++++++-------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/tests/setup-mocha.js b/tests/setup-mocha.js index d707bbb..d40e7a5 100644 --- a/tests/setup-mocha.js +++ b/tests/setup-mocha.js @@ -3,6 +3,6 @@ var mocha = require('mocha'); mocha.setup('bdd').timeout(10000).slow(250); window.onload = function() { - mocha.checkLeaks(); - mocha.run(); + mocha.checkLeaks(); + mocha.run(); }; diff --git a/tests/webpack.config.js b/tests/webpack.config.js index eb14a64..fc837a5 100644 --- a/tests/webpack.config.js +++ b/tests/webpack.config.js @@ -1,61 +1,61 @@ const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -const NodePolyfillPlugin = require("node-polyfill-webpack-plugin"); +const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const path = require('path'); module.exports = env => ({ - mode: 'development', - entry: path.resolve(__dirname, './webpack-tests.js'), - resolve: { - alias: { - 'fsProvider': path.resolve(__dirname, '../shims/providers/default'), - }, + mode: 'development', + entry: path.resolve(__dirname, './webpack-tests.js'), + resolve: { + alias: { + 'fsProvider': path.resolve(__dirname, '../shims/providers/default'), }, - output: { - path: path.resolve(__dirname, './dist-webpack'), - filename: 'index.js', - }, - plugins: [ - new webpack.ContextReplacementPlugin( - // Mocha safely uses require in such a way that webpack cannot statically extract dependancies. - // If the ignoreRequestDependancyExpressionWarnings env is set, we will aggregate these warnings - // into one summary warning to minimise spamming the console. - /\/node_modules\/mocha\/lib/, - (data) => { - if (env.ignoreRequestDependancyExpressionWarnings) { - let requestDependencyExpressionsIgnored = 0; - data.dependencies.forEach((dependancy) => { - if (dependancy.critical === 'the request of a dependency is an expression') { - dependancy.critical = undefined; - requestDependencyExpressionsIgnored += 1; - } - }); - console.log(`WARNING: Ignoring ${requestDependencyExpressionsIgnored} "request of a dependency is an expression" warnings from "node_modules/mocha/lib".`); - } - return data; - }, - ), - new NodePolyfillPlugin(), - new MiniCssExtractPlugin(), - new HtmlWebpackPlugin({ - title: 'Filer Tests - Webpack Build', - template: './tests/webpack.index.html', - }), + }, + output: { + path: path.resolve(__dirname, './dist-webpack'), + filename: 'index.js', + }, + plugins: [ + new webpack.ContextReplacementPlugin( + // Mocha safely uses require in such a way that webpack cannot statically extract dependancies. + // If the ignoreRequestDependancyExpressionWarnings env is set, we will aggregate these warnings + // into one summary warning to minimise spamming the console. + /\/node_modules\/mocha\/lib/, + (data) => { + if (env.ignoreRequestDependancyExpressionWarnings) { + let requestDependencyExpressionsIgnored = 0; + data.dependencies.forEach((dependancy) => { + if (dependancy.critical === 'the request of a dependency is an expression') { + dependancy.critical = undefined; + requestDependencyExpressionsIgnored += 1; + } + }); + console.log(`WARNING: Ignoring ${requestDependencyExpressionsIgnored} "request of a dependency is an expression" warnings from "node_modules/mocha/lib".`); + } + return data; + }, + ), + new NodePolyfillPlugin(), + new MiniCssExtractPlugin(), + new HtmlWebpackPlugin({ + title: 'Filer Tests - Webpack Build', + template: './tests/webpack.index.html', + }), + ], + module: { + rules: [ + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, 'css-loader'], + }, ], - module: { - rules: [ - { - test: /\.css$/i, - use: [MiniCssExtractPlugin.loader, 'css-loader'], - }, - ], - }, - optimization: { - minimize: false, - }, - devtool: 'inline-source-map', - devServer: { - contentBase: path.resolve(__dirname, './dist-webpack'), - } + }, + optimization: { + minimize: false, + }, + devtool: 'inline-source-map', + devServer: { + contentBase: path.resolve(__dirname, './dist-webpack'), + } });