| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent df63d37 commit 1a93df8
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,9 +3,7 @@ | |||
| 3 | 3 | const inspector = require('inspector'); | |
| 4 | 4 | const { promisify } = require('internal/util'); | |
| 5 | 5 | ||
| 6 | - class Session extends inspector.Session { | ||
| 7 | - constructor() { super(); } // eslint-disable-line no-useless-constructor | ||
| 8 | - } | ||
| 6 | + class Session extends inspector.Session {} | ||
| 9 | 7 | Session.prototype.post = promisify(inspector.Session.prototype.post); | |
| 10 | 8 | ||
| 11 | 9 | module.exports = { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -960,14 +960,7 @@ function writeFloatBackwards(val, offset = 0) { | |||
| 960 | 960 | return offset; | |
| 961 | 961 | } | |
| 962 | 962 | ||
| 963 | - class FastBuffer extends Uint8Array { | ||
| 964 | - // Using an explicit constructor here is necessary to avoid relying on | ||
| 965 | - // `Array.prototype[Symbol.iterator]`, which can be mutated by users. | ||
| 966 | - // eslint-disable-next-line no-useless-constructor | ||
| 967 | - constructor(bufferOrLength, byteOffset, length) { | ||
| 968 | - super(bufferOrLength, byteOffset, length); | ||
| 969 | - } | ||
| 970 | - } | ||
| 963 | + class FastBuffer extends Uint8Array {} | ||
| 971 | 964 | ||
| 972 | 965 | function addBufferPrototypeMethods(proto) { | |
| 973 | 966 | proto.readBigUInt64LE = readBigUInt64LE; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -253,11 +253,6 @@ const { | |||
| 253 | 253 | } | |
| 254 | 254 | ||
| 255 | 255 | class AsymmetricKeyObject extends KeyObject { | |
| 256 | - // eslint-disable-next-line no-useless-constructor | ||
| 257 | - constructor(type, handle) { | ||
| 258 | - super(type, handle); | ||
| 259 | - } | ||
| 260 | - | ||
| 261 | 256 | get asymmetricKeyType() { | |
| 262 | 257 | return this[kAsymmetricKeyType] ||= this[kHandle].getAsymmetricKeyType(); | |
| 263 | 258 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -240,7 +240,6 @@ class Pattern { | |||
| 240 | 240 | class ResultSet extends SafeSet { | |
| 241 | 241 | #root = '.'; | |
| 242 | 242 | #isExcluded = () => false; | |
| 243 | - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor | ||
| 244 | 243 | ||
| 245 | 244 | setup(root, isExcludedFn) { | |
| 246 | 245 | this.#root = root; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,8 +23,6 @@ const { validateString } = require('internal/validators'); | |||
| 23 | 23 | * This cache is *not* used when custom loaders are registered. | |
| 24 | 24 | */ | |
| 25 | 25 | class ResolveCache extends SafeMap { | |
| 26 | - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor | ||
| 27 | - | ||
| 28 | 26 | /** | |
| 29 | 27 | * Generates the internal serialized cache key and returns it along the actual cache object. | |
| 30 | 28 | * | |
@@ -93,7 +91,6 @@ class ResolveCache extends SafeMap { | |||
| 93 | 91 | * Cache the results of the `load` step of the module resolution and loading process. | |
| 94 | 92 | */ | |
| 95 | 93 | class LoadCache extends SafeMap { | |
| 96 | - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor | ||
| 97 | 94 | get(url, type = kImplicitTypeAttribute) { | |
| 98 | 95 | validateString(url, 'url'); | |
| 99 | 96 | validateString(type, 'type'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -401,55 +401,36 @@ primordials.makeSafe = makeSafe; | |||
| 401 | 401 | ||
| 402 | 402 | // Subclass the constructors because we need to use their prototype | |
| 403 | 403 | // methods later. | |
| 404 | - // Defining the `constructor` is necessary here to avoid the default | ||
| 405 | - // constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. | ||
| 406 | 404 | primordials.SafeMap = makeSafe( | |
| 407 | 405 | Map, | |
| 408 | - class SafeMap extends Map { | ||
| 409 | - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor | ||
| 410 | - }, | ||
| 406 | + class SafeMap extends Map {}, | ||
| 411 | 407 | ); | |
| 412 | 408 | primordials.SafeWeakMap = makeSafe( | |
| 413 | 409 | WeakMap, | |
| 414 | - class SafeWeakMap extends WeakMap { | ||
| 415 | - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor | ||
| 416 | - }, | ||
| 410 | + class SafeWeakMap extends WeakMap {}, | ||
| 417 | 411 | ); | |
| 418 | 412 | ||
| 419 | 413 | primordials.SafeSet = makeSafe( | |
| 420 | 414 | Set, | |
| 421 | - class SafeSet extends Set { | ||
| 422 | - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor | ||
| 423 | - }, | ||
| 415 | + class SafeSet extends Set {}, | ||
| 424 | 416 | ); | |
| 425 | 417 | primordials.SafeWeakSet = makeSafe( | |
| 426 | 418 | WeakSet, | |
| 427 | - class SafeWeakSet extends WeakSet { | ||
| 428 | - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor | ||
| 429 | - }, | ||
| 419 | + class SafeWeakSet extends WeakSet {}, | ||
| 430 | 420 | ); | |
| 431 | 421 | ||
| 432 | 422 | primordials.SafeFinalizationRegistry = makeSafe( | |
| 433 | 423 | FinalizationRegistry, | |
| 434 | - class SafeFinalizationRegistry extends FinalizationRegistry { | ||
| 435 | - // eslint-disable-next-line no-useless-constructor | ||
| 436 | - constructor(cleanupCallback) { super(cleanupCallback); } | ||
| 437 | - }, | ||
| 424 | + class SafeFinalizationRegistry extends FinalizationRegistry {}, | ||
| 438 | 425 | ); | |
| 439 | 426 | primordials.SafeWeakRef = makeSafe( | |
| 440 | 427 | WeakRef, | |
| 441 | - class SafeWeakRef extends WeakRef { | ||
| 442 | - // eslint-disable-next-line no-useless-constructor | ||
| 443 | - constructor(target) { super(target); } | ||
| 444 | - }, | ||
| 428 | + class SafeWeakRef extends WeakRef {}, | ||
| 445 | 429 | ); | |
| 446 | 430 | ||
| 447 | 431 | const SafePromise = makeSafe( | |
| 448 | 432 | Promise, | |
| 449 | - class SafePromise extends Promise { | ||
| 450 | - // eslint-disable-next-line no-useless-constructor | ||
| 451 | - constructor(executor) { super(executor); } | ||
| 452 | - }, | ||
| 433 | + class SafePromise extends Promise {}, | ||
| 453 | 434 | ); | |
| 454 | 435 | ||
| 455 | 436 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -359,10 +359,6 @@ ObjectSetPrototypeOf(InterfaceConstructor.prototype, EventEmitter.prototype); | |||
| 359 | 359 | ObjectSetPrototypeOf(InterfaceConstructor, EventEmitter); | |
| 360 | 360 | ||
| 361 | 361 | class Interface extends InterfaceConstructor { | |
| 362 | - // eslint-disable-next-line no-useless-constructor | ||
| 363 | - constructor(input, output, completer, terminal) { | ||
| 364 | - super(input, output, completer, terminal); | ||
| 365 | - } | ||
| 366 | 362 | get columns() { | |
| 367 | 363 | if (this.output?.columns) return this.output.columns; | |
| 368 | 364 | return Infinity; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -97,10 +97,6 @@ function isRecoverableError(e, code) { | |||
| 97 | 97 | .extend( | |
| 98 | 98 | (Parser) => { | |
| 99 | 99 | return class extends Parser { | |
| 100 | - // eslint-disable-next-line no-useless-constructor | ||
| 101 | - constructor(options, input, startPos) { | ||
| 102 | - super(options, input, startPos); | ||
| 103 | - } | ||
| 104 | 100 | nextToken() { | |
| 105 | 101 | super.nextToken(); | |
| 106 | 102 | if (this.type === tt.eof) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,10 +27,6 @@ const { | |||
| 27 | 27 | let addAbortListener; | |
| 28 | 28 | ||
| 29 | 29 | class Interface extends _Interface { | |
| 30 | - // eslint-disable-next-line no-useless-constructor | ||
| 31 | - constructor(input, output, completer, terminal) { | ||
| 32 | - super(input, output, completer, terminal); | ||
| 33 | - } | ||
| 34 | 30 | question(query, options = kEmptyObject) { | |
| 35 | 31 | return new Promise((resolve, reject) => { | |
| 36 | 32 | let cb = resolve; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments