Skip to content

Commit a8f7ad2

Browse files
refactor: drop webpack@4
1 parent 8ebd622 commit a8f7ad2

File tree

9 files changed

+14
-37
lines changed

9 files changed

+14
-37
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
@@ -64,7 +64,7 @@
6464
"del-cli": "^3.0.1",
6565
"es-check": "^5.1.2",
6666
"eslint": "^7.13.0",
67-
"eslint-config-prettier": "^6.15.0",
67+
"eslint-config-prettier": "^7.1.0",
6868
"eslint-plugin-import": "^2.22.1",
6969
"file-loader": "^6.2.0",
7070
"husky": "^4.3.0",
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
const webpack = require('webpack');
22

3-
module.exports = () => {
4-
return webpack.version[0] !== '4';
5-
};
3+
module.exports = () => webpack.version[0] !== '4';
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
const webpack = require('webpack');
22

3-
module.exports = () => {
4-
return webpack.version[0] !== '4';
5-
};
3+
module.exports = () => webpack.version[0] !== '4';

test/cases/dependOn/test.filter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
const webpack = require('webpack');
22

3-
module.exports = () => {
4-
return webpack.version[0] !== '4';
5-
};
3+
module.exports = () => webpack.version[0] !== '4';

test/helpers/compile.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export default (compiler) => {
2-
return new Promise((resolve, reject) => {
1+
export default (compiler) =>
2+
new Promise((resolve, reject) => {
33
compiler.run((error, stats) => {
44
if (error) {
55
return reject(error);
@@ -8,4 +8,3 @@ export default (compiler) => {
88
return resolve(stats);
99
});
1010
});
11-
};

test/helpers/getErrors.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import normalizeErrors from './normalizeErrors';
22

3-
export default (stats) => {
4-
return normalizeErrors(stats.compilation.errors);
5-
};
3+
export default (stats) => normalizeErrors(stats.compilation.errors);

test/helpers/getWarnings.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import normalizeErrors from './normalizeErrors';
22

3-
export default (stats) => {
4-
return normalizeErrors(stats.compilation.warnings);
5-
};
3+
export default (stats) => normalizeErrors(stats.compilation.warnings);

test/helpers/normalizeErrors.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ function removeCWD(str) {
1212
return str.replace(new RegExp(cwd, 'g'), '');
1313
}
1414

15-
export default (errors) => {
16-
return errors.map((error) =>
15+
export default (errors) =>
16+
errors.map((error) =>
1717
removeCWD(error.toString().split('\n').slice(0, 2).join('\n'))
1818
);
19-
};

0 commit comments

Comments
 (0)