Skip to content

Commit d677bdd

Browse files
Mohsen Azimisokra
authored andcommitted
pretty
1 parent 0fa8cd9 commit d677bdd

File tree

5 files changed

+29
-14
lines changed

5 files changed

+29
-14
lines changed

declarations.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ declare module "webpack-cli";
44
// Deprecated NodeJS API usages in Webpack
55
declare namespace NodeJS {
66
interface Process {
7-
binding(internalModule: string): any;
7+
binding(internalModule: string): any;
88
}
9-
}
9+
}
1010

1111
/**
1212
* Global variable declarations

lib/RuntimeTemplate.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ module.exports = class RuntimeTemplate {
2020
* @property {string=} message
2121
* @property {string=} exportName
2222
*/
23-
comment(/** @type {CommentOptions} */{ request, chunkName, chunkReason, message, exportName }) {
23+
comment(
24+
/** @type {CommentOptions} */ {
25+
request,
26+
chunkName,
27+
chunkReason,
28+
message,
29+
exportName
30+
}
31+
) {
2432
let content;
2533
if (this.outputOptions.pathinfo) {
2634
content = [message, request, chunkName, chunkReason]

lib/optimize/ModuleConcatenationPlugin.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,17 @@ class ModuleConcatenationPlugin {
148148
nonHarmonyReasons.map(r => r.explanation).filter(Boolean)
149149
);
150150
const importingModuleTypes = new Map(
151-
Array.from(importingModules).map(m => /** @type {[string, Set]} */([
152-
m,
153-
new Set(
154-
nonHarmonyReasons
155-
.filter(r => r.module === m)
156-
.map(r => r.dependency.type)
157-
.sort()
158-
)
159-
]))
151+
Array.from(importingModules).map(
152+
m => /** @type {[string, Set]} */ ([
153+
m,
154+
new Set(
155+
nonHarmonyReasons
156+
.filter(r => r.module === m)
157+
.map(r => r.dependency.type)
158+
.sort()
159+
)
160+
])
161+
)
160162
);
161163
setBailoutReason(module, requestShortener => {
162164
const names = Array.from(importingModules)

lib/util/StackedSetMap.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ class StackedSetMap {
9191
this._compress();
9292
return Array.from(
9393
this.map.entries(),
94-
pair => /** @type {[any, any]} */(pair[1] === UNDEFINED_MARKER ? [pair[0], undefined] : pair)
94+
pair =>
95+
/** @type {[any, any]} */ (pair[1] === UNDEFINED_MARKER
96+
? [pair[0], undefined]
97+
: pair)
9598
);
9699
}
97100

lib/util/objectToMap.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
* @returns {Map} an ES6 Map of KV pairs
77
*/
88
module.exports = function objectToMap(obj) {
9-
return new Map(Object.keys(obj).map(key => /** @type [string, string] */([key, obj[key]])));
9+
return new Map(
10+
Object.keys(obj).map(key => /** @type [string, string] */ [key, obj[key]])
11+
);
1012
};

0 commit comments

Comments
 (0)