Skip to content

Commit 0ac4d02

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Daily arc lint --take PRETTIERJAVASCRIPT
Reviewed By: dtolnay Differential Revision: D78796910 fbshipit-source-id: 9092bd474153e5c7b9df86baf3ed06f2a0fe1dd2
1 parent 24a7a7f commit 0ac4d02

File tree

11 files changed

+287
-96
lines changed

11 files changed

+287
-96
lines changed

packages/api/src/lib/APIUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import {config, constant, utils} from '@memlab/core';
1616
const puppeteer = constant.isFRL
1717
? {}
1818
: constant.isFB
19-
? require('puppeteer-core')
20-
: require('puppeteer');
19+
? require('puppeteer-core')
20+
: require('puppeteer');
2121

2222
async function getBrowser(
2323
options: {config?: MemLabConfig; warmup?: boolean} = {},

packages/cli/src/commands/helper/HelperCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ export default class HelperCommand extends BaseCommand {
7878
const commandsToPrintFirst = heapConfig.isCliInteractiveMode
7979
? []
8080
: item
81-
? item.commands
82-
: [];
81+
? item.commands
82+
: [];
8383
this.printCategory(
8484
category as CommandCategory,
8585
commandsToPrintFirst,

packages/cli/src/options/e2e/SetDeviceOption.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import optionConstants from '../lib/OptionConstant';
1616
const devices = constant.isFRL
1717
? {}
1818
: constant.isFB
19-
? require('puppeteer-core/DeviceDescriptors')
20-
: // eslint-disable-next-line @typescript-eslint/no-var-requires
21-
require('puppeteer').KnownDevices;
19+
? require('puppeteer-core/DeviceDescriptors')
20+
: // eslint-disable-next-line @typescript-eslint/no-var-requires
21+
require('puppeteer').KnownDevices;
2222

2323
export default class SetDeviceOption extends BaseOption {
2424
getOptionName(): string {

packages/core/src/lib/Config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ type ConfigOption = {
5252
const devices = constant.isFRL
5353
? {}
5454
: constant.isFB
55-
? require('puppeteer-core/DeviceDescriptors')
56-
: // eslint-disable-next-line @typescript-eslint/no-var-requires
57-
require('puppeteer').KnownDevices;
55+
? require('puppeteer-core/DeviceDescriptors')
56+
: // eslint-disable-next-line @typescript-eslint/no-var-requires
57+
require('puppeteer').KnownDevices;
5858

5959
// default viewport config for desktop
6060
const windowWidth = 1680;

packages/core/src/lib/Utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,8 +1060,8 @@ function parseHTMLTags(html: string): ParsedTag[] {
10601060
const type: TagType = isClosing
10611061
? 'closing'
10621062
: isSelfClosing
1063-
? 'self-closing'
1064-
: 'opening';
1063+
? 'self-closing'
1064+
: 'opening';
10651065

10661066
result.push({tagName, attributes, type});
10671067
} else {

packages/core/src/lib/heap-data/HeapEdge.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ import {throwError} from './HeapUtils';
1818
import HeapNode from './HeapNode';
1919

2020
export default class HeapEdge implements IHeapEdge {
21-
constructor(private heapSnapshot: HeapSnapshot, private idx: number) {}
21+
constructor(
22+
private heapSnapshot: HeapSnapshot,
23+
private idx: number,
24+
) {}
2225

2326
get snapshot(): HeapSnapshot {
2427
return this.heapSnapshot;

packages/core/src/lib/heap-data/HeapLocation.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ import type HeapSnapshot from './HeapSnapshot';
2222
import type HeapNode from './HeapNode';
2323

2424
export default class HeapLocation implements IHeapLocation {
25-
constructor(private heapSnapshot: HeapSnapshot, private idx: number) {}
25+
constructor(
26+
private heapSnapshot: HeapSnapshot,
27+
private idx: number,
28+
) {}
2629

2730
get snapshot(): HeapSnapshot {
2831
return this.heapSnapshot;

packages/core/src/lib/heap-data/HeapNode.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ export function isHeapStringType(type: string): boolean {
3232
}
3333

3434
export default class HeapNode implements IHeapNode {
35-
constructor(private heapSnapshot: HeapSnapshot, private idx: number) {}
35+
constructor(
36+
private heapSnapshot: HeapSnapshot,
37+
private idx: number,
38+
) {}
3639

3740
get snapshot(): HeapSnapshot {
3841
return this.heapSnapshot;

packages/core/src/paths/TraceFinder.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,8 @@ class TraceFinder {
357357
}
358358
const childNodeIndex = (forwardEdges.get(edgeIndex) as IHeapEdge).toNode
359359
.nodeIndex;
360-
nodesWithOutdatedDominatorInfo[
361-
nodeIndex2PostOrderIndex[childNodeIndex]
362-
] = 1;
360+
nodesWithOutdatedDominatorInfo[nodeIndex2PostOrderIndex[childNodeIndex]] =
361+
1;
363362
}
364363

365364
// now iterate through all nodes in the heap

packages/e2e/src/NetworkManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default class NetworkManager {
6868
urlPattern: pattern,
6969
resourceType: 'Script',
7070
interceptionStage: 'HeadersReceived',
71-
} as AnyValue),
71+
}) as AnyValue,
7272
),
7373
// .css stylesheets
7474
...patterns.map(
@@ -77,7 +77,7 @@ export default class NetworkManager {
7777
urlPattern: pattern,
7878
resourceType: 'Stylesheet',
7979
interceptionStage: 'HeadersReceived',
80-
} as AnyValue),
80+
}) as AnyValue,
8181
),
8282
// .html documents
8383
...patterns.map(
@@ -86,7 +86,7 @@ export default class NetworkManager {
8686
urlPattern: pattern,
8787
resourceType: 'Document',
8888
interceptionStage: 'HeadersReceived',
89-
} as AnyValue),
89+
}) as AnyValue,
9090
),
9191
],
9292
});

0 commit comments

Comments
 (0)