Skip to content

Commit 7b5c00a

Browse files
aduh95targos
authored andcommitted
lib: add trailing commas in internal/perf
PR-URL: #46697 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 4c12e6e commit 7b5c00a

9 files changed

+30
-29
lines changed

lib/.eslintrc.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ overrides:
287287
- ./internal/mime.js
288288
- ./internal/modules/*.js
289289
- ./internal/per_context/messageport.js
290+
- ./internal/perf/*.js
290291
- ./internal/policy/*.js
291292
- ./internal/priority_queue.js
292293
- ./internal/process/*.js

lib/internal/perf/event_loop_delay.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
codes: {
1010
ERR_ILLEGAL_CONSTRUCTOR,
1111
ERR_INVALID_THIS,
12-
}
12+
},
1313
} = require('internal/errors');
1414

1515
const {

lib/internal/perf/nodetiming.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const {
2525
NODE_PERFORMANCE_MILESTONE_LOOP_START,
2626
NODE_PERFORMANCE_MILESTONE_LOOP_EXIT,
2727
NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE,
28-
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT
28+
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT,
2929
},
3030
loopIdleTime,
3131
} = internalBinding('performance');
@@ -37,28 +37,28 @@ class PerformanceNodeTiming {
3737
__proto__: null,
3838
enumerable: true,
3939
configurable: true,
40-
value: 'node'
40+
value: 'node',
4141
},
4242

4343
entryType: {
4444
__proto__: null,
4545
enumerable: true,
4646
configurable: true,
47-
value: 'node'
47+
value: 'node',
4848
},
4949

5050
startTime: {
5151
__proto__: null,
5252
enumerable: true,
5353
configurable: true,
54-
value: 0
54+
value: 0,
5555
},
5656

5757
duration: {
5858
__proto__: null,
5959
enumerable: true,
6060
configurable: true,
61-
get: now
61+
get: now,
6262
},
6363

6464
nodeStart: {
@@ -67,7 +67,7 @@ class PerformanceNodeTiming {
6767
configurable: true,
6868
get() {
6969
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_NODE_START);
70-
}
70+
},
7171
},
7272

7373
v8Start: {
@@ -76,7 +76,7 @@ class PerformanceNodeTiming {
7676
configurable: true,
7777
get() {
7878
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_V8_START);
79-
}
79+
},
8080
},
8181

8282
environment: {
@@ -85,7 +85,7 @@ class PerformanceNodeTiming {
8585
configurable: true,
8686
get() {
8787
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_ENVIRONMENT);
88-
}
88+
},
8989
},
9090

9191
loopStart: {
@@ -94,7 +94,7 @@ class PerformanceNodeTiming {
9494
configurable: true,
9595
get() {
9696
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_START);
97-
}
97+
},
9898
},
9999

100100
loopExit: {
@@ -103,7 +103,7 @@ class PerformanceNodeTiming {
103103
configurable: true,
104104
get() {
105105
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_EXIT);
106-
}
106+
},
107107
},
108108

109109
bootstrapComplete: {
@@ -113,15 +113,15 @@ class PerformanceNodeTiming {
113113
get() {
114114
return getMilestoneTimestamp(
115115
NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE);
116-
}
116+
},
117117
},
118118

119119
idleTime: {
120120
__proto__: null,
121121
enumerable: true,
122122
configurable: true,
123123
get: loopIdleTime,
124-
}
124+
},
125125
});
126126
}
127127

@@ -130,7 +130,7 @@ class PerformanceNodeTiming {
130130

131131
const opts = {
132132
...options,
133-
depth: options.depth == null ? null : options.depth - 1
133+
depth: options.depth == null ? null : options.depth - 1,
134134
};
135135

136136
return `PerformanceNodeTiming ${inspect(this.toJSON(), opts)}`;

lib/internal/perf/observe.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class PerformanceObserverEntryList {
213213

214214
const opts = {
215215
...options,
216-
depth: options.depth == null ? null : options.depth - 1
216+
depth: options.depth == null ? null : options.depth - 1,
217217
};
218218

219219
return `PerformanceObserverEntryList ${inspect(this[kBuffer], opts)}`;
@@ -358,7 +358,7 @@ class PerformanceObserver {
358358

359359
const opts = {
360360
...options,
361-
depth: options.depth == null ? null : options.depth - 1
361+
depth: options.depth == null ? null : options.depth - 1,
362362
};
363363

364364
return `PerformanceObserver ${inspect({

lib/internal/perf/performance.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const {
1010
const {
1111
codes: {
1212
ERR_ILLEGAL_CONSTRUCTOR,
13-
ERR_MISSING_ARGS
14-
}
13+
ERR_MISSING_ARGS,
14+
},
1515
} = require('internal/errors');
1616

1717
const {
@@ -47,7 +47,7 @@ const { validateInternalField } = require('internal/validators');
4747
const { convertToInt } = require('internal/webidl');
4848

4949
const {
50-
getTimeOriginTimestamp
50+
getTimeOriginTimestamp,
5151
} = internalBinding('performance');
5252

5353
const kPerformanceBrand = Symbol('performance');
@@ -62,7 +62,7 @@ class Performance extends EventTarget {
6262

6363
const opts = {
6464
...options,
65-
depth: options.depth == null ? null : options.depth - 1
65+
depth: options.depth == null ? null : options.depth - 1,
6666
};
6767

6868
return `Performance ${inspect({
@@ -235,7 +235,7 @@ const performance = createPerformance();
235235

236236
function dispatchBufferFull(type) {
237237
const event = new Event(type, {
238-
[kTrustEvent]: true
238+
[kTrustEvent]: true,
239239
});
240240
performance.dispatchEvent(event);
241241
}

lib/internal/perf/performance_entry.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
const {
1010
codes: {
1111
ERR_ILLEGAL_CONSTRUCTOR,
12-
}
12+
},
1313
} = require('internal/errors');
1414

1515
const {
@@ -60,7 +60,7 @@ class PerformanceEntry {
6060

6161
const opts = {
6262
...options,
63-
depth: options.depth == null ? null : options.depth - 1
63+
depth: options.depth == null ? null : options.depth - 1,
6464
};
6565

6666
return `${this.constructor.name} ${inspect(this.toJSON(), opts)}`;

lib/internal/perf/resource_timing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const { enqueue, bufferResourceTiming } = require('internal/perf/observe');
1414
const {
1515
codes: {
1616
ERR_ILLEGAL_CONSTRUCTOR,
17-
}
17+
},
1818
} = require('internal/errors');
1919
const { validateInternalField } = require('internal/validators');
2020
const { kEnumerableProperty } = require('internal/util');

lib/internal/perf/timerify.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const {
1717
} = require('internal/validators');
1818

1919
const {
20-
isHistogram
20+
isHistogram,
2121
} = require('internal/histogram');
2222

2323
const {
@@ -57,7 +57,7 @@ function timerify(fn, options = kEmptyObject) {
5757

5858
validateObject(options, 'options');
5959
const {
60-
histogram
60+
histogram,
6161
} = options;
6262

6363
if (histogram !== undefined &&
@@ -99,8 +99,8 @@ function timerify(fn, options = kEmptyObject) {
9999
__proto__: null,
100100
configurable: false,
101101
enumerable: true,
102-
value: `timerified ${fn.name}`
103-
}
102+
value: `timerified ${fn.name}`,
103+
},
104104
});
105105

106106
return timerified;

lib/internal/perf/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ function refreshTimeOrigin() {
2929
module.exports = {
3030
now,
3131
getMilestoneTimestamp,
32-
refreshTimeOrigin
32+
refreshTimeOrigin,
3333
};

0 commit comments

Comments
 (0)