Skip to content

Commit 943c39e

Browse files
committed
fix: linter rules
1 parent f779dc6 commit 943c39e

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

packages/rpc/src/client.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable tsdoc/syntax */
12
import { randomUUID } from 'node:crypto';
23
import { clearTimeout, setTimeout } from 'node:timers';
34
import { URLSearchParams } from 'node:url';
@@ -270,10 +271,10 @@ export class RPCClient extends AsyncEventEmitter<MappedRPCEventsDispatchData> {
270271
* Authorize
271272
*
272273
* @param options - authorization options
273-
* @param [options.scopes] - An array of scopes
274-
* @param [options.clientId] - Client's Id
275-
* @param [options.clientSecret] - Client's Secret
276-
* @param [options.redirectUri] - URI to redirect to
274+
* @param options.scopes - An array of scopes
275+
* @param options.clientId - Client's Id
276+
* @param options.clientSecret - Client's Secret
277+
* @param options.redirectUri - URI to redirect to
277278
*/
278279
private async authorize({
279280
scopes,
@@ -400,8 +401,8 @@ export class RPCClient extends AsyncEventEmitter<MappedRPCEventsDispatchData> {
400401
*
401402
* @param id - Id of the voice channel
402403
* @param options - Options
403-
* @param [options.timeout] - Timeout for the command
404-
* @param [options.force] - Force this move. This should only be done if you
404+
* @param options.timeout - Timeout for the command
405+
* @param options.force - Force this move. This should only be done if you
405406
*
406407
* have explicit permission from the user.
407408
*/
@@ -422,7 +423,7 @@ export class RPCClient extends AsyncEventEmitter<MappedRPCEventsDispatchData> {
422423
*
423424
* @param id - Id of the voice channel
424425
* @param options - Options
425-
* @param [options.timeout] - Timeout for the command
426+
* @param options.timeout - Timeout for the command
426427
*
427428
* have explicit permission from the user.
428429
*/

packages/rpc/src/ipc.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const working: WorkingData = {
128128
};
129129

130130
// eslint-disable-next-line promise/prefer-await-to-callbacks
131-
export function decode(socket: Socket, callback: (data: { data: RPCMessagePayload, op: OPCodes; }) => void) {
131+
export function decode(socket: Socket, callback: (data: { data: RPCMessagePayload; op: OPCodes }) => void) {
132132
const packet = socket.read();
133133
if (!packet) {
134134
return;
@@ -148,12 +148,13 @@ export function decode(socket: Socket, callback: (data: { data: RPCMessagePayloa
148148
const data = JSON.parse(working.full + raw);
149149
working.full = '';
150150
working.op = undefined;
151-
callback({ op: op!, data }); return;
151+
// eslint-disable-next-line promise/prefer-await-to-callbacks
152+
callback({ op: op!, data });
153+
return;
152154
} catch {
153155
working.full += raw;
154156
}
155157

156-
157158
decode(socket, callback);
158159
}
159160

packages/rpc/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const register: (scheme: string) => boolean = (() => {
99
try {
1010
// eslint-disable-next-line @typescript-eslint/no-require-imports
1111
return require('register-scheme');
12-
} catch {}
12+
} catch {}
1313
}
1414
})();
1515

0 commit comments

Comments
 (0)