mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
chore: remove unused eslint disable comments (#8595)
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
/* eslint-disable id-length */
|
/* eslint-disable id-length */
|
||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -591,7 +591,6 @@ class WebSocketShard extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.debug(
|
this.debug(
|
||||||
// eslint-disable-next-line max-len
|
|
||||||
`[WebSocket] did not close properly, assuming a zombie connection.\nEmitting close and reconnecting again.`,
|
`[WebSocket] did not close properly, assuming a zombie connection.\nEmitting close and reconnecting again.`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,6 @@ class GuildManager extends CachedManager {
|
|||||||
return super.resolveId(guild);
|
return super.resolveId(guild);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable max-len */
|
|
||||||
/**
|
/**
|
||||||
* Options used to create a guild.
|
* Options used to create a guild.
|
||||||
* @typedef {Object} GuildCreateOptions
|
* @typedef {Object} GuildCreateOptions
|
||||||
|
|||||||
@@ -727,7 +727,6 @@ class Guild extends AnonymousGuild {
|
|||||||
return new GuildAuditLogs(this, data);
|
return new GuildAuditLogs(this, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable max-len */
|
|
||||||
/**
|
/**
|
||||||
* The data for editing a guild.
|
* The data for editing a guild.
|
||||||
* @typedef {Object} GuildEditData
|
* @typedef {Object} GuildEditData
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class InteractionWebhook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// These are here only for documentation purposes - they are implemented by Webhook
|
// These are here only for documentation purposes - they are implemented by Webhook
|
||||||
/* eslint-disable no-empty-function, valid-jsdoc */
|
/* eslint-disable no-empty-function */
|
||||||
/**
|
/**
|
||||||
* Sends a message with this webhook.
|
* Sends a message with this webhook.
|
||||||
* @param {string|MessagePayload|InteractionReplyOptions} options The content for the reply
|
* @param {string|MessagePayload|InteractionReplyOptions} options The content for the reply
|
||||||
|
|||||||
@@ -128,7 +128,6 @@ class MessagePayload {
|
|||||||
let nonce;
|
let nonce;
|
||||||
if (typeof this.options.nonce !== 'undefined') {
|
if (typeof this.options.nonce !== 'undefined') {
|
||||||
nonce = this.options.nonce;
|
nonce = this.options.nonce;
|
||||||
// eslint-disable-next-line max-len
|
|
||||||
if (typeof nonce === 'number' ? !Number.isInteger(nonce) : typeof nonce !== 'string') {
|
if (typeof nonce === 'number' ? !Number.isInteger(nonce) : typeof nonce !== 'string') {
|
||||||
throw new RangeError(ErrorCodes.MessageNonceType);
|
throw new RangeError(ErrorCodes.MessageNonceType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ class Collector extends EventEmitter {
|
|||||||
|
|
||||||
const onEnd = () => {
|
const onEnd = () => {
|
||||||
cleanup();
|
cleanup();
|
||||||
reject(this.collected); // eslint-disable-line prefer-promise-reject-errors
|
reject(this.collected);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.on('collect', onCollect);
|
this.on('collect', onCollect);
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ function audioCycleStep() {
|
|||||||
player['_stepDispatch']();
|
player['_stepDispatch']();
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
||||||
prepareNextAudioFrame(available);
|
prepareNextAudioFrame(available);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/* eslint-disable jsdoc/check-param-names */
|
/* eslint-disable jsdoc/check-param-names */
|
||||||
/* eslint-disable id-length */
|
/* eslint-disable id-length */
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
/* eslint-disable @typescript-eslint/method-signature-style */
|
|
||||||
import { Buffer } from 'node:buffer';
|
import { Buffer } from 'node:buffer';
|
||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
import { VoiceOpcodes } from 'discord-api-types/voice/v4';
|
import { VoiceOpcodes } from 'discord-api-types/voice/v4';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/method-signature-style */
|
|
||||||
import { Buffer } from 'node:buffer';
|
import { Buffer } from 'node:buffer';
|
||||||
import { createSocket, type Socket } from 'node:dgram';
|
import { createSocket, type Socket } from 'node:dgram';
|
||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/method-signature-style */
|
|
||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
import { VoiceOpcodes } from 'discord-api-types/voice/v4';
|
import { VoiceOpcodes } from 'discord-api-types/voice/v4';
|
||||||
import WebSocket, { type MessageEvent } from 'ws';
|
import WebSocket, { type MessageEvent } from 'ws';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/method-signature-style */
|
|
||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/method-signature-style, @typescript-eslint/unified-signatures */
|
/* eslint-disable @typescript-eslint/unified-signatures */
|
||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
|
|
||||||
export interface SpeakingMap extends EventEmitter {
|
export interface SpeakingMap extends EventEmitter {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const methods: Methods = {
|
|||||||
void (async () => {
|
void (async () => {
|
||||||
for (const libName of Object.keys(libs) as (keyof typeof libs)[]) {
|
for (const libName of Object.keys(libs) as (keyof typeof libs)[]) {
|
||||||
try {
|
try {
|
||||||
// eslint-disable-next-line unicorn/no-abusive-eslint-disable, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
||||||
const lib = require(libName);
|
const lib = require(libName);
|
||||||
if (libName === 'libsodium-wrappers' && lib.ready) await lib.ready;
|
if (libName === 'libsodium-wrappers' && lib.ready) await lib.ready;
|
||||||
Object.assign(methods, libs[libName](lib));
|
Object.assign(methods, libs[libName](lib));
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable unicorn/require-post-message-target-origin */
|
|
||||||
import { isMainThread, parentPort } from 'node:worker_threads';
|
import { isMainThread, parentPort } from 'node:worker_threads';
|
||||||
import { Collection } from '@discordjs/collection';
|
import { Collection } from '@discordjs/collection';
|
||||||
import type { SessionInfo } from '../../ws/WebSocketManager.js';
|
import type { SessionInfo } from '../../ws/WebSocketManager.js';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable unicorn/require-post-message-target-origin */
|
|
||||||
import { once } from 'node:events';
|
import { once } from 'node:events';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { Worker } from 'node:worker_threads';
|
import { Worker } from 'node:worker_threads';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable unicorn/require-post-message-target-origin */
|
|
||||||
import { isMainThread, workerData, parentPort } from 'node:worker_threads';
|
import { isMainThread, workerData, parentPort } from 'node:worker_threads';
|
||||||
import { Collection } from '@discordjs/collection';
|
import { Collection } from '@discordjs/collection';
|
||||||
import { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js';
|
import { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js';
|
||||||
|
|||||||
@@ -136,11 +136,9 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
|||||||
const url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;
|
const url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;
|
||||||
this.debug([`Connecting to ${url}`]);
|
this.debug([`Connecting to ${url}`]);
|
||||||
const connection = new WebSocket(url, { handshakeTimeout: this.strategy.options.handshakeTimeout ?? undefined })
|
const connection = new WebSocket(url, { handshakeTimeout: this.strategy.options.handshakeTimeout ?? undefined })
|
||||||
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
||||||
.on('message', this.onMessage.bind(this))
|
.on('message', this.onMessage.bind(this))
|
||||||
.on('error', this.onError.bind(this))
|
.on('error', this.onError.bind(this))
|
||||||
.on('close', this.onClose.bind(this));
|
.on('close', this.onClose.bind(this));
|
||||||
/* eslint-enable @typescript-eslint/no-misused-promises */
|
|
||||||
|
|
||||||
connection.binaryType = 'arraybuffer';
|
connection.binaryType = 'arraybuffer';
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
|
|||||||
Reference in New Issue
Block a user