Skip to content

Commit 3225863

Browse files
authored
chore(deps): update eslint-config-prettier (#2919)
1 parent e9b629f commit 3225863

16 files changed

+176
-217
lines changed

package-lock.json

Lines changed: 4 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"body-parser": "^1.19.0",
8181
"css-loader": "^5.0.1",
8282
"eslint": "^7.15.0",
83-
"eslint-config-prettier": "^6.15.0",
83+
"eslint-config-prettier": "^7.0.0",
8484
"eslint-config-webpack": "^1.2.5",
8585
"eslint-plugin-import": "^2.22.1",
8686
"execa": "^5.0.0",

test/cli/cli.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ runCLITest('CLI', () => {
2323
* @param {string} str String to quote
2424
* @returns {string} Escaped string
2525
*/
26-
const quotemeta = (str) => {
27-
return str.replace(/[-[\]\\/{}()*+?.^$|]/g, '\\$&');
28-
};
26+
const quotemeta = (str) => str.replace(/[-[\]\\/{}()*+?.^$|]/g, '\\$&');
2927

3028
const normalizeOutput = (output) =>
3129
output

test/e2e/Progress.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ describe('client progress', () => {
7070
browser.close().then(() => {
7171
// check that there is some percentage progress output
7272
const regExp = /^\[webpack-dev-server\] [0-9]{1,3}% - /;
73-
const match = res.find((line) => {
74-
return regExp.test(line);
75-
});
73+
const match = res.find((line) => regExp.test(line));
7674
// eslint-disable-next-line no-undefined
7775
expect(match).not.toEqual(undefined);
7876
done();

test/e2e/ProvidePlugin.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ describe('ProvidePlugin', () => {
2525
page.waitForNavigation({ waitUntil: 'load' }).then(() => {
2626
page.waitForTimeout(beforeBrowserCloseDelay).then(() => {
2727
page
28-
.evaluate(() => {
29-
return window.injectedClient === window.expectedClient;
30-
})
28+
.evaluate(() => window.injectedClient === window.expectedClient)
3129
.then((isCorrectClient) => {
3230
browser.close().then(() => {
3331
expect(isCorrectClient).toBeTruthy();
@@ -60,9 +58,7 @@ describe('ProvidePlugin', () => {
6058
page.waitForNavigation({ waitUntil: 'load' }).then(() => {
6159
page.waitForTimeout(beforeBrowserCloseDelay).then(() => {
6260
page
63-
.evaluate(() => {
64-
return window.injectedClient === window.expectedClient;
65-
})
61+
.evaluate(() => window.injectedClient === window.expectedClient)
6662
.then((isCorrectClient) => {
6763
browser.close().then(() => {
6864
expect(isCorrectClient).toBeTruthy();

test/fixtures/entry-as-function/webpack.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
module.exports = {
44
mode: 'development',
55
context: __dirname,
6-
entry: () => {
7-
return './foo.js';
8-
},
6+
entry: () => './foo.js',
97
plugins: [
108
{
119
apply(compiler) {

test/fixtures/promise-config/webpack.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
const { join } = require('path');
44

5-
module.exports = () => {
6-
return new Promise((resolve) => {
5+
module.exports = () =>
6+
new Promise((resolve) => {
77
resolve({
88
mode: 'development',
99
entry: join(__dirname, 'foo.js'),
1010
});
1111
});
12-
};

test/options.test.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,20 @@ describe('options', () => {
9393
expect(false).toBeTruthy();
9494
}
9595
})
96-
.then(() => {
97-
return new Promise((resolve) => {
98-
if (server) {
99-
server.close(() => {
100-
compiler = null;
101-
server = null;
96+
.then(
97+
() =>
98+
new Promise((resolve) => {
99+
if (server) {
100+
server.close(() => {
101+
compiler = null;
102+
server = null;
103+
resolve();
104+
});
105+
} else {
102106
resolve();
103-
});
104-
} else {
105-
resolve();
106-
}
107-
});
108-
})
107+
}
108+
})
109+
)
109110
.then(() => {
110111
current += 1;
111112
});
@@ -495,9 +496,7 @@ describe('options', () => {
495496
};
496497

497498
Object.keys(cases).forEach((key) => {
498-
it(key, () => {
499-
return validateOption(key, cases[key]);
500-
});
499+
it(key, () => validateOption(key, cases[key]));
501500
});
502501
});
503502
});

test/server/Server.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ describe('Server', () => {
3434
(compilation) => {
3535
const mainDeps = compilation.entries.get('main').dependencies;
3636
const globalDeps = compilation.globalEntry.dependencies;
37-
entries = globalDeps.concat(mainDeps).map((dep) => {
38-
return relative('.', dep.request).split(sep);
39-
});
37+
entries = globalDeps
38+
.concat(mainDeps)
39+
.map((dep) => relative('.', dep.request).split(sep));
4040
}
4141
);
4242
} else {
43-
entries = server.middleware.context.compiler.options.entry.map((p) => {
44-
return relative('.', p).split(sep);
45-
});
43+
entries = server.middleware.context.compiler.options.entry.map((p) =>
44+
relative('.', p).split(sep)
45+
);
4646
}
4747
}
4848

test/server/onAfterSetupMiddleware-option.test.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,21 @@ describe('onAfterSetupMiddleware option', () => {
3939

4040
afterAll(testServer.close);
4141

42-
it('should handle after route', () => {
43-
return req
42+
it('should handle after route', () =>
43+
req
4444
.get('/after/some/path')
4545
.expect('Content-Type', 'text/html; charset=utf-8')
4646
.expect(200)
4747
.then((response) => {
4848
expect(response.text).toBe('after');
49-
});
50-
});
49+
}));
5150

52-
it('should handle POST requests to after route', () => {
53-
return req
51+
it('should handle POST requests to after route', () =>
52+
req
5453
.post('/after/some/path')
5554
.expect('Content-Type', 'text/html; charset=utf-8')
5655
.expect(200)
5756
.then((response) => {
5857
expect(response.text).toBe('after POST');
59-
});
60-
});
58+
}));
6159
});

0 commit comments

Comments
 (0)