Skip to content

Commit d91caea

Browse files
committed
Pretty files for updated prettier version
1 parent 28cc9ff commit d91caea

File tree

7 files changed

+66
-66
lines changed

7 files changed

+66
-66
lines changed

declarations.d.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,23 @@ declare namespace NodeJS {
99
}
1010

1111
// There are no typings for chrome-trace-event
12-
declare module 'chrome-trace-event' {
12+
declare module "chrome-trace-event" {
1313
interface Event {
14-
name: string
15-
id?: number
16-
cat: string[]
17-
args?: Object
14+
name: string;
15+
id?: number;
16+
cat: string[];
17+
args?: Object;
1818
}
1919

2020
export class Tracer {
21-
constructor(options: {
22-
noStream: boolean
23-
})
24-
pipe(stream: NodeJS.WritableStream) : void
25-
instantEvent(event: Event) : void
26-
counter: number
21+
constructor(options: { noStream: boolean });
22+
pipe(stream: NodeJS.WritableStream): void;
23+
instantEvent(event: Event): void;
24+
counter: number;
2725
trace: {
28-
begin(event: Event) : void
29-
end(event: Event) : void
30-
}
26+
begin(event: Event): void;
27+
end(event: Event): void;
28+
};
3129
}
3230
}
3331

lib/Stats.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ class Stats {
100100
const optionOrLocalFallback = (v, def) =>
101101
typeof v !== "undefined"
102102
? v
103-
: typeof options.all !== "undefined" ? options.all : def;
103+
: typeof options.all !== "undefined"
104+
? options.all
105+
: def;
104106

105107
const testAgainstGivenOption = item => {
106108
if (typeof item === "string") {
@@ -262,7 +264,9 @@ class Stats {
262264
text += `chunk ${e.chunk.name || e.chunk.id}${
263265
e.chunk.hasRuntime()
264266
? " [entry]"
265-
: e.chunk.canBeInitial() ? " [initial]" : ""
267+
: e.chunk.canBeInitial()
268+
? " [initial]"
269+
: ""
266270
}\n`;
267271
}
268272
if (e.file) {

lib/WebpackOptionsApply.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ class WebpackOptionsApply extends OptionsApply {
235235
"MappingURL=[url]\n*/"
236236
: legacy
237237
? "\n/*\n//@ source" + "MappingURL=[url]\n*/"
238-
: modern ? "\n//# source" + "MappingURL=[url]" : null;
238+
: modern
239+
? "\n//# source" + "MappingURL=[url]"
240+
: null;
239241
let Plugin = evalWrapped
240242
? EvalSourceMapDevToolPlugin
241243
: SourceMapDevToolPlugin;
@@ -259,7 +261,9 @@ class WebpackOptionsApply extends OptionsApply {
259261
? "\n//@ sourceURL=[url]\n//# sourceURL=[url]"
260262
: legacy
261263
? "\n//@ sourceURL=[url]"
262-
: modern ? "\n//# sourceURL=[url]" : null;
264+
: modern
265+
? "\n//# sourceURL=[url]"
266+
: null;
263267
new EvalDevToolModulePlugin({
264268
sourceUrlComment: comment,
265269
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,

lib/optimize/SplitChunksPlugin.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,15 @@ module.exports = class SplitChunksPlugin {
291291
minSize:
292292
cacheGroupSource.minSize !== undefined
293293
? cacheGroupSource.minSize
294-
: cacheGroupSource.enforce ? 0 : this.options.minSize,
294+
: cacheGroupSource.enforce
295+
? 0
296+
: this.options.minSize,
295297
minChunks:
296298
cacheGroupSource.minChunks !== undefined
297299
? cacheGroupSource.minChunks
298-
: cacheGroupSource.enforce ? 1 : this.options.minChunks,
300+
: cacheGroupSource.enforce
301+
? 1
302+
: this.options.minChunks,
299303
maxAsyncRequests:
300304
cacheGroupSource.maxAsyncRequests !== undefined
301305
? cacheGroupSource.maxAsyncRequests

test/Chunk.unittest.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ const Chunk = require("../lib/Chunk");
88
describe("Chunk", () => {
99
let ChunkInstance;
1010

11-
beforeEach(
12-
() => (ChunkInstance = new Chunk("chunk-test", "module-test", "loc-test"))
13-
);
11+
beforeEach(() =>
12+
(ChunkInstance = new Chunk("chunk-test", "module-test", "loc-test")));
1413

1514
it("should have debugId more than 999", () =>
1615
should(ChunkInstance.debugId).be.above(999));

test/NullDependency.unittest.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ describe("NullDependency", () => {
3333
it("is a function", () => NullDependency.Template.should.be.a.Function());
3434

3535
describe("when created", () => {
36-
beforeEach(
37-
() => (env.nullDependencyTemplate = new NullDependency.Template())
38-
);
36+
beforeEach(() =>
37+
(env.nullDependencyTemplate = new NullDependency.Template()));
3938

4039
it("has apply function", () =>
4140
env.nullDependencyTemplate.apply.should.be.Function());

test/SourceMapDevToolModuleOptionsPlugin.unittest.js

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,28 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
1111
beforeEach(() => (eventBindings = undefined));
1212

1313
describe("with module false and line-to-line false", () => {
14-
beforeEach(
15-
() =>
16-
(eventBindings = applyPluginWithOptions(
17-
SourceMapDevToolModuleOptionsPlugin,
18-
{
19-
module: false,
20-
lineToLine: false
21-
}
22-
))
23-
);
14+
beforeEach(() =>
15+
(eventBindings = applyPluginWithOptions(
16+
SourceMapDevToolModuleOptionsPlugin,
17+
{
18+
module: false,
19+
lineToLine: false
20+
}
21+
)));
2422

2523
it("does not bind any event handlers", () =>
2624
eventBindings.length.should.be.exactly(0));
2725
});
2826

2927
describe("with module true", () => {
30-
beforeEach(
31-
() =>
32-
(eventBindings = applyPluginWithOptions(
33-
SourceMapDevToolModuleOptionsPlugin,
34-
{
35-
module: true,
36-
lineToLine: false
37-
}
38-
))
39-
);
28+
beforeEach(() =>
29+
(eventBindings = applyPluginWithOptions(
30+
SourceMapDevToolModuleOptionsPlugin,
31+
{
32+
module: true,
33+
lineToLine: false
34+
}
35+
)));
4036

4137
it("binds one event handler", () =>
4238
eventBindings.length.should.be.exactly(1));
@@ -56,16 +52,14 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
5652
});
5753

5854
describe("with line-to-line true", () => {
59-
beforeEach(
60-
() =>
61-
(eventBindings = applyPluginWithOptions(
62-
SourceMapDevToolModuleOptionsPlugin,
63-
{
64-
module: false,
65-
lineToLine: true
66-
}
67-
))
68-
);
55+
beforeEach(() =>
56+
(eventBindings = applyPluginWithOptions(
57+
SourceMapDevToolModuleOptionsPlugin,
58+
{
59+
module: false,
60+
lineToLine: true
61+
}
62+
)));
6963

7064
it("binds one event handler", () =>
7165
eventBindings.length.should.be.exactly(1));
@@ -85,16 +79,14 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
8579
});
8680

8781
describe("with line-to-line object", () => {
88-
beforeEach(
89-
() =>
90-
(eventBindings = applyPluginWithOptions(
91-
SourceMapDevToolModuleOptionsPlugin,
92-
{
93-
module: false,
94-
lineToLine: {}
95-
}
96-
))
97-
);
82+
beforeEach(() =>
83+
(eventBindings = applyPluginWithOptions(
84+
SourceMapDevToolModuleOptionsPlugin,
85+
{
86+
module: false,
87+
lineToLine: {}
88+
}
89+
)));
9890

9991
it("binds one event handler", () =>
10092
eventBindings.length.should.be.exactly(1));

0 commit comments

Comments
 (0)