refactor: use eslint-config-neon for packages. (#8579)

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
Suneet Tipirneni
2022-09-01 14:50:16 -04:00
committed by GitHub
parent 4bdb0593ae
commit edadb9fe5d
219 changed files with 2608 additions and 2053 deletions

View File

@@ -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) {}

View File

@@ -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

View File

@@ -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);
}
/**