Skip to content

Commit 71c0e0f

Browse files
committed
chore: fix linting issues
1 parent eaf0c90 commit 71c0e0f

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

tests/setup-mocha.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ var mocha = require('mocha');
33
mocha.setup('bdd').timeout(10000).slow(250);
44

55
window.onload = function() {
6-
mocha.checkLeaks();
7-
mocha.run();
6+
mocha.checkLeaks();
7+
mocha.run();
88
};

tests/webpack.config.js

+52-52
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
const webpack = require('webpack');
22
const HtmlWebpackPlugin = require('html-webpack-plugin');
3-
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
3+
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
44
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
55
const path = require('path');
66

77
module.exports = env => ({
8-
mode: 'development',
9-
entry: path.resolve(__dirname, './webpack-tests.js'),
10-
resolve: {
11-
alias: {
12-
'fsProvider': path.resolve(__dirname, '../shims/providers/default'),
13-
},
8+
mode: 'development',
9+
entry: path.resolve(__dirname, './webpack-tests.js'),
10+
resolve: {
11+
alias: {
12+
'fsProvider': path.resolve(__dirname, '../shims/providers/default'),
1413
},
15-
output: {
16-
path: path.resolve(__dirname, './dist-webpack'),
17-
filename: 'index.js',
18-
},
19-
plugins: [
20-
new webpack.ContextReplacementPlugin(
21-
// Mocha safely uses require in such a way that webpack cannot statically extract dependancies.
22-
// If the ignoreRequestDependancyExpressionWarnings env is set, we will aggregate these warnings
23-
// into one summary warning to minimise spamming the console.
24-
/\/node_modules\/mocha\/lib/,
25-
(data) => {
26-
if (env.ignoreRequestDependancyExpressionWarnings) {
27-
let requestDependencyExpressionsIgnored = 0;
28-
data.dependencies.forEach((dependancy) => {
29-
if (dependancy.critical === 'the request of a dependency is an expression') {
30-
dependancy.critical = undefined;
31-
requestDependencyExpressionsIgnored += 1;
32-
}
33-
});
34-
console.log(`WARNING: Ignoring ${requestDependencyExpressionsIgnored} "request of a dependency is an expression" warnings from "node_modules/mocha/lib".`);
35-
}
36-
return data;
37-
},
38-
),
39-
new NodePolyfillPlugin(),
40-
new MiniCssExtractPlugin(),
41-
new HtmlWebpackPlugin({
42-
title: 'Filer Tests - Webpack Build',
43-
template: './tests/webpack.index.html',
44-
}),
14+
},
15+
output: {
16+
path: path.resolve(__dirname, './dist-webpack'),
17+
filename: 'index.js',
18+
},
19+
plugins: [
20+
new webpack.ContextReplacementPlugin(
21+
// Mocha safely uses require in such a way that webpack cannot statically extract dependancies.
22+
// If the ignoreRequestDependancyExpressionWarnings env is set, we will aggregate these warnings
23+
// into one summary warning to minimise spamming the console.
24+
/\/node_modules\/mocha\/lib/,
25+
(data) => {
26+
if (env.ignoreRequestDependancyExpressionWarnings) {
27+
let requestDependencyExpressionsIgnored = 0;
28+
data.dependencies.forEach((dependancy) => {
29+
if (dependancy.critical === 'the request of a dependency is an expression') {
30+
dependancy.critical = undefined;
31+
requestDependencyExpressionsIgnored += 1;
32+
}
33+
});
34+
console.log(`WARNING: Ignoring ${requestDependencyExpressionsIgnored} "request of a dependency is an expression" warnings from "node_modules/mocha/lib".`);
35+
}
36+
return data;
37+
},
38+
),
39+
new NodePolyfillPlugin(),
40+
new MiniCssExtractPlugin(),
41+
new HtmlWebpackPlugin({
42+
title: 'Filer Tests - Webpack Build',
43+
template: './tests/webpack.index.html',
44+
}),
45+
],
46+
module: {
47+
rules: [
48+
{
49+
test: /\.css$/i,
50+
use: [MiniCssExtractPlugin.loader, 'css-loader'],
51+
},
4552
],
46-
module: {
47-
rules: [
48-
{
49-
test: /\.css$/i,
50-
use: [MiniCssExtractPlugin.loader, 'css-loader'],
51-
},
52-
],
53-
},
54-
optimization: {
55-
minimize: false,
56-
},
57-
devtool: 'inline-source-map',
58-
devServer: {
59-
contentBase: path.resolve(__dirname, './dist-webpack'),
60-
}
53+
},
54+
optimization: {
55+
minimize: false,
56+
},
57+
devtool: 'inline-source-map',
58+
devServer: {
59+
contentBase: path.resolve(__dirname, './dist-webpack'),
60+
}
6161
});

0 commit comments

Comments
 (0)