Skip to content

Commit

Permalink
events: add trailing commas in source files
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
aduh95 authored and danielleadams committed Apr 11, 2023
1 parent 01d8267 commit b08687f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,15 @@ overrides:
- ./cluster.js
- ./console.js
- ./constants.js
- ./events.js
- ./fs.js
- ./internal/assert.js
- ./internal/child_process.js
- ./internal/child_process/*.js
- ./internal/cli_table.js
- ./internal/cluster/*.js
- ./internal/debugger/*.js
- ./internal/event_target.js
- ./internal/events/*.js
- ./internal/fixed_queue.js
- ./internal/freelist.js
Expand Down
16 changes: 8 additions & 8 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const {
ERR_INVALID_ARG_TYPE,
ERR_INVALID_THIS,
ERR_OUT_OF_RANGE,
ERR_UNHANDLED_ERROR
ERR_UNHANDLED_ERROR,
},
genericNodeError,
} = require('internal/errors');
Expand Down Expand Up @@ -95,7 +95,7 @@ let EventEmitterAsyncResource;
function lazyEventEmitterAsyncResource() {
if (EventEmitterAsyncResource === undefined) {
const {
AsyncResource
AsyncResource,
} = require('async_hooks');

const kEventEmitter = Symbol('kEventEmitter');
Expand Down Expand Up @@ -232,7 +232,7 @@ ObjectDefineProperty(EventEmitter, 'captureRejections', {

EventEmitter.prototype[kCapture] = value;
},
enumerable: true
enumerable: true,
});

ObjectDefineProperty(EventEmitter, 'EventEmitterAsyncResource', {
Expand All @@ -250,7 +250,7 @@ ObjectDefineProperty(EventEmitter.prototype, kCapture, {
__proto__: null,
value: false,
writable: true,
enumerable: false
enumerable: false,
});

EventEmitter.prototype._events = undefined;
Expand Down Expand Up @@ -279,7 +279,7 @@ ObjectDefineProperty(EventEmitter, 'defaultMaxListeners', {
arg);
}
defaultMaxListeners = arg;
}
},
});

ObjectDefineProperties(EventEmitter, {
Expand All @@ -296,7 +296,7 @@ ObjectDefineProperties(EventEmitter, {
enumerable: false,
configurable: false,
writable: false,
}
},
});

/**
Expand Down Expand Up @@ -480,7 +480,7 @@ EventEmitter.prototype.emit = function emit(type, ...args) {
ObjectDefineProperty(er, kEnhanceStackBeforeInspector, {
__proto__: null,
value: FunctionPrototypeBind(enhanceStackTrace, this, er, capture),
configurable: true
configurable: true,
});
} catch {
// Continue regardless of error.
Expand Down Expand Up @@ -1092,7 +1092,7 @@ function on(emitter, event, options = kEmptyObject) {

[SymbolAsyncIterator]() {
return this;
}
},
}, AsyncIteratorPrototype);

eventTargetAgnosticAddListener(emitter, event, eventHandler);
Expand Down

0 comments on commit b08687f

Please sign in to comment.