From 4b5e3730da17346851b695e8c73a5569d0ab4b30 Mon Sep 17 00:00:00 2001 From: 0t4u <61939142+0t4u@users.noreply.github.com> Date: Sun, 11 Aug 2024 10:12:34 +0800 Subject: [PATCH] chore: lint files --- eslint.config.mjs | 16 ++++++++-------- src/guild/Player.ts | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index f098d069..30e3ac81 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -9,8 +9,8 @@ export default tseslint.config( ignores: [ 'docs/*', 'dist/*', - 'node_modules/*', - ], + 'node_modules/*' + ] }, eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, @@ -24,11 +24,11 @@ export default tseslint.config( languageOptions: { parserOptions: { projectService: true, - tsconfigRootDir: import.meta.dirname, - }, + tsconfigRootDir: import.meta.dirname + } }, plugins: { - '@stylistic': stylistic, + '@stylistic': stylistic }, rules: { '@stylistic/semi': [ 'error' ], @@ -50,7 +50,7 @@ export default tseslint.config( '@stylistic/arrow-spacing': 'error', '@stylistic/switch-colon-spacing': [ 'error', { 'after': true, 'before': false }], 'camelcase': 'off', - 'require-await': 'error', - }, - }, + 'require-await': 'error' + } + } ); \ No newline at end of file diff --git a/src/guild/Player.ts b/src/guild/Player.ts index cc6cf48e..5e502062 100644 --- a/src/guild/Player.ts +++ b/src/guild/Player.ts @@ -13,7 +13,7 @@ export enum PlayerEventType { TRACK_END_EVENT = 'TrackEndEvent', TRACK_EXCEPTION_EVENT = 'TrackExceptionEvent', TRACK_STUCK_EVENT = 'TrackStuckEvent', - WEBSOCKET_CLOSED_EVENT = 'WebSocketClosedEvent', + WEBSOCKET_CLOSED_EVENT = 'WebSocketClosedEvent' } export interface Band { @@ -227,7 +227,7 @@ export class Player extends EventEmitter implements IPlayer { guildId: this.guildId, playerOptions: { track: { - encoded: this.track, + encoded: this.track }, position: this.position, paused: this.paused, @@ -235,10 +235,10 @@ export class Player extends EventEmitter implements IPlayer { voice: { token: connection.serverUpdate!.token, endpoint: connection.serverUpdate!.endpoint, - sessionId: connection.sessionId!, + sessionId: connection.sessionId! }, - volume: this.volume, - }, + volume: this.volume + } }; } @@ -425,7 +425,7 @@ export class Player extends EventEmitter implements IPlayer { rotation: null, distortion: null, channelMix: null, - lowPass: null, + lowPass: null }); } @@ -460,7 +460,7 @@ export class Player extends EventEmitter implements IPlayer { const data = { guildId: this.guildId, noReplace, - playerOptions, + playerOptions }; await this.node.rest.updatePlayer(data); @@ -505,9 +505,9 @@ export class Player extends EventEmitter implements IPlayer { voice: { token: connection.serverUpdate!.token, endpoint: connection.serverUpdate!.endpoint, - sessionId: connection.sessionId!, - }, - }, + sessionId: connection.sessionId! + } + } }; await this.node.rest.updatePlayer(playerUpdate); } @@ -549,7 +549,7 @@ export class Player extends EventEmitter implements IPlayer { this.node.emit( 'debug', this.node.name, - `[Player] -> [Node] : Unknown Player Event Type, Data => ${JSON.stringify(json)}`, + `[Player] -> [Node] : Unknown Player Event Type, Data => ${JSON.stringify(json)}` ); } }