mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
refactor: use eslint-config-neon for packages. (#8579)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import type { WebSocketManager } from '../ws/WebSocketManager';
|
||||
export class IdentifyThrottler {
|
||||
private identifyState = {
|
||||
remaining: 0,
|
||||
resetsAt: Infinity,
|
||||
resetsAt: Number.POSITIVE_INFINITY,
|
||||
};
|
||||
|
||||
public constructor(private readonly manager: WebSocketManager) {}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import process from 'node:process';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
import { APIVersion, GatewayOpcodes } from 'discord-api-types/v10';
|
||||
import { lazy } from './utils';
|
||||
import type { OptionalWebSocketManagerOptions, SessionInfo } from '../ws/WebSocketManager';
|
||||
import type { OptionalWebSocketManagerOptions, SessionInfo } from '../ws/WebSocketManager.js';
|
||||
import { lazy } from './utils.js';
|
||||
|
||||
/**
|
||||
* Valid encoding types
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ShardRange } from '../ws/WebSocketManager';
|
||||
|
||||
export type Awaitable<T> = T | Promise<T>;
|
||||
export type Awaitable<T> = Promise<T> | T;
|
||||
|
||||
/**
|
||||
* Yields the numbers in the given range as an array
|
||||
@@ -11,7 +11,7 @@ export type Awaitable<T> = T | Promise<T>;
|
||||
* ```
|
||||
*/
|
||||
export function range({ start, end }: ShardRange): number[] {
|
||||
return Array.from({ length: end - start + 1 }, (_, i) => i + start);
|
||||
return Array.from({ length: end - start + 1 }, (_, index) => index + start);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user