Skip to content

Commit b08687f

Browse files
aduh95danielleadams
authored andcommitted
events: add trailing commas in source files
PR-URL: #46759 Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 01d8267 commit b08687f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/.eslintrc.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,15 @@ overrides:
257257
- ./cluster.js
258258
- ./console.js
259259
- ./constants.js
260+
- ./events.js
260261
- ./fs.js
261262
- ./internal/assert.js
262263
- ./internal/child_process.js
263264
- ./internal/child_process/*.js
264265
- ./internal/cli_table.js
265266
- ./internal/cluster/*.js
266267
- ./internal/debugger/*.js
268+
- ./internal/event_target.js
267269
- ./internal/events/*.js
268270
- ./internal/fixed_queue.js
269271
- ./internal/freelist.js

lib/events.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const {
6767
ERR_INVALID_ARG_TYPE,
6868
ERR_INVALID_THIS,
6969
ERR_OUT_OF_RANGE,
70-
ERR_UNHANDLED_ERROR
70+
ERR_UNHANDLED_ERROR,
7171
},
7272
genericNodeError,
7373
} = require('internal/errors');
@@ -95,7 +95,7 @@ let EventEmitterAsyncResource;
9595
function lazyEventEmitterAsyncResource() {
9696
if (EventEmitterAsyncResource === undefined) {
9797
const {
98-
AsyncResource
98+
AsyncResource,
9999
} = require('async_hooks');
100100

101101
const kEventEmitter = Symbol('kEventEmitter');
@@ -232,7 +232,7 @@ ObjectDefineProperty(EventEmitter, 'captureRejections', {
232232

233233
EventEmitter.prototype[kCapture] = value;
234234
},
235-
enumerable: true
235+
enumerable: true,
236236
});
237237

238238
ObjectDefineProperty(EventEmitter, 'EventEmitterAsyncResource', {
@@ -250,7 +250,7 @@ ObjectDefineProperty(EventEmitter.prototype, kCapture, {
250250
__proto__: null,
251251
value: false,
252252
writable: true,
253-
enumerable: false
253+
enumerable: false,
254254
});
255255

256256
EventEmitter.prototype._events = undefined;
@@ -279,7 +279,7 @@ ObjectDefineProperty(EventEmitter, 'defaultMaxListeners', {
279279
arg);
280280
}
281281
defaultMaxListeners = arg;
282-
}
282+
},
283283
});
284284

285285
ObjectDefineProperties(EventEmitter, {
@@ -296,7 +296,7 @@ ObjectDefineProperties(EventEmitter, {
296296
enumerable: false,
297297
configurable: false,
298298
writable: false,
299-
}
299+
},
300300
});
301301

302302
/**
@@ -480,7 +480,7 @@ EventEmitter.prototype.emit = function emit(type, ...args) {
480480
ObjectDefineProperty(er, kEnhanceStackBeforeInspector, {
481481
__proto__: null,
482482
value: FunctionPrototypeBind(enhanceStackTrace, this, er, capture),
483-
configurable: true
483+
configurable: true,
484484
});
485485
} catch {
486486
// Continue regardless of error.
@@ -1092,7 +1092,7 @@ function on(emitter, event, options = kEmptyObject) {
10921092

10931093
[SymbolAsyncIterator]() {
10941094
return this;
1095-
}
1095+
},
10961096
}, AsyncIteratorPrototype);
10971097

10981098
eventTargetAgnosticAddListener(emitter, event, eventHandler);

0 commit comments

Comments
 (0)