Skip to content

Commit 5238159

Browse files
committed
run prettier on existing code
1 parent 518d1e0 commit 5238159

File tree

399 files changed

+18970
-12632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+18970
-12632
lines changed

bin/webpack.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ let webpackCliInstalled = false;
44
try {
55
require.resolve("webpack-cli");
66
webpackCliInstalled = true;
7-
} catch(e) {
7+
} catch (e) {
88
webpackCliInstalled = false;
99
}
1010

11-
if(webpackCliInstalled) {
11+
if (webpackCliInstalled) {
1212
require("webpack-cli"); // eslint-disable-line node/no-missing-require, node/no-extraneous-require, node/no-unpublished-require
1313
} else {
1414
console.error("The CLI moved into a separate package: webpack-cli.");
15-
console.error("Please install 'webpack-cli' in addition to webpack itself to use the CLI.");
15+
console.error(
16+
"Please install 'webpack-cli' in addition to webpack itself to use the CLI."
17+
);
1618
console.error("-> When using npm: npm install webpack-cli -D");
1719
console.error("-> When using yarn: yarn add webpack-cli -D");
1820
process.exitCode = 1;

buildin/global.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ g = (function() {
77

88
try {
99
// This works if eval is allowed (see CSP)
10-
g = g || Function("return this")() || (1,eval)("this");
11-
} catch(e) {
10+
g = g || Function("return this")() || (1, eval)("this");
11+
} catch (e) {
1212
// This works if the window reference is available
13-
if(typeof window === "object")
14-
g = window;
13+
if (typeof window === "object") g = window;
1514
}
1615

1716
// g can still be undefined, but nothing to do about it...

buildin/harmony-module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = function(originalModule) {
2-
if(!originalModule.webpackPolyfill) {
2+
if (!originalModule.webpackPolyfill) {
33
var module = Object.create(originalModule);
44
// module.parent = undefined by default
5-
if(!module.children) module.children = [];
5+
if (!module.children) module.children = [];
66
Object.defineProperty(module, "loaded", {
77
enumerable: true,
88
get: function() {
@@ -16,7 +16,7 @@ module.exports = function(originalModule) {
1616
}
1717
});
1818
Object.defineProperty(module, "exports", {
19-
enumerable: true,
19+
enumerable: true
2020
});
2121
module.webpackPolyfill = 1;
2222
}

buildin/module.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = function(module) {
2-
if(!module.webpackPolyfill) {
2+
if (!module.webpackPolyfill) {
33
module.deprecate = function() {};
44
module.paths = [];
55
// module.parent = undefined by default
6-
if(!module.children) module.children = [];
6+
if (!module.children) module.children = [];
77
Object.defineProperty(module, "loaded", {
88
enumerable: true,
99
get: function() {

examples/coffee-script/webpack.config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
module.exports = {
22
// mode: "development || "production",
33
module: {
4-
rules: [{
5-
test: /\.coffee$/,
6-
loader: "coffee-loader"
7-
}]
4+
rules: [
5+
{
6+
test: /\.coffee$/,
7+
loader: "coffee-loader"
8+
}
9+
]
810
},
911
resolve: {
1012
extensions: [".web.coffee", ".web.js", ".coffee", ".js"]

examples/dll-app-and-vendor/0-vendor/webpack.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ module.exports = {
88
output: {
99
filename: "vendor.js", // best use [hash] here too
1010
path: path.resolve(__dirname, "dist"),
11-
library: "vendor_lib_[hash]",
11+
library: "vendor_lib_[hash]"
1212
},
1313
plugins: [
1414
new webpack.DllPlugin({
1515
name: "vendor_lib_[hash]",
16-
path: path.resolve(__dirname, "dist/vendor-manifest.json"),
17-
}),
18-
],
16+
path: path.resolve(__dirname, "dist/vendor-manifest.json")
17+
})
18+
]
1919
};

examples/dll-app-and-vendor/1-app/webpack.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ module.exports = {
77
entry: "./example-app",
88
output: {
99
filename: "app.js",
10-
path: path.resolve(__dirname, "dist"),
10+
path: path.resolve(__dirname, "dist")
1111
},
1212
plugins: [
1313
new webpack.DllReferencePlugin({
1414
context: ".",
15-
manifest: require("../0-vendor/dist/vendor-manifest.json"), // eslint-disable-line
16-
}),
17-
],
15+
manifest: require("../0-vendor/dist/vendor-manifest.json") // eslint-disable-line
16+
})
17+
]
1818
};

examples/explicit-vendor-chunk/webpack.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
var path = require("path");
22
var webpack = require("../../");
33
module.exports = [
4-
54
{
65
name: "vendor",
76
// mode: "development || "production",
@@ -38,5 +37,4 @@ module.exports = [
3837
})
3938
]
4039
}
41-
4240
];

examples/externals/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
externals: [
77
"add",
88
{
9-
"subtract": {
9+
subtract: {
1010
root: "subtract",
1111
commonjs2: "./subtract",
1212
commonjs: ["./math", "subtract"],

examples/hybrid-routing/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
// The entry points for the pages
66
// They also contains router
77
pageA: ["./aEntry", "./router"],
8-
pageB: ["./bEntry", "./router"],
8+
pageB: ["./bEntry", "./router"]
99
},
1010
output: {
1111
path: path.join(__dirname, "dist"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy