🚨 Fix EsLint errors

This commit is contained in:
Manuel Ruwe 2022-12-20 11:03:24 +01:00
parent 4cf961f2df
commit 46aa88e9b3
14 changed files with 14 additions and 9 deletions

View File

@ -21,5 +21,6 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'linebreak-style': 0,
},
};

View File

@ -17,6 +17,7 @@ export class DisconnectCommand implements DiscordCommand {
private readonly discordMessageService: DiscordMessageService,
) {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
handler(interaction: CommandInteraction): GenericCustomReply {
const disconnect = this.discordVoiceService.disconnect();

View File

@ -13,6 +13,7 @@ import { GenericCustomReply } from '../models/generic-try-handler';
export class HelpCommand implements DiscordCommand {
constructor(private readonly discordMessageService: DiscordMessageService) {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
handler(commandInteraction: CommandInteraction): GenericCustomReply {
return {
embeds: [

View File

@ -17,6 +17,7 @@ export class SkipTrackCommand implements DiscordCommand {
) {}
handler(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interactionCommand: CommandInteraction,
): InteractionReplyOptions | string {
if (!this.playbackService.nextTrack()) {

View File

@ -17,6 +17,7 @@ export class PausePlaybackCommand implements DiscordCommand {
) {}
handler(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
commandInteraction: CommandInteraction,
): string | InteractionReplyOptions {
const shouldBePaused = this.discordVoiceService.togglePaused();

View File

@ -49,6 +49,7 @@ export class PlayItemCommand
async handler(
@Payload() dto: TrackRequestDto,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
executionContext: TransformedCommandExecutionContext<any>,
): Promise<InteractionReplyOptions | string> {
const items = await this.jellyfinSearchService.search(dto.search);

View File

@ -20,6 +20,7 @@ export class PlaylistCommand implements DiscordCommand {
private readonly playbackService: PlaybackService,
) {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
handler(interaction: CommandInteraction): GenericCustomReply {
const playList = this.playbackService.getPlaylist();

View File

@ -17,6 +17,7 @@ export class PreviousTrackCommand implements DiscordCommand {
) {}
handler(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
dcommandInteraction: CommandInteraction,
): InteractionReplyOptions | string {
if (!this.playbackService.previousTrack()) {

View File

@ -4,13 +4,13 @@ import {
Command,
DiscordCommand,
InjectDiscordClient,
UsePipes
UsePipes,
} from '@discord-nestjs/core';
import {
Client,
CommandInteraction,
InteractionReplyOptions,
Status
Status,
} from 'discord.js';
import { formatDuration, intervalToDuration } from 'date-fns';
@ -34,6 +34,7 @@ export class StatusCommand implements DiscordCommand {
) {}
async handler(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
commandInteraction: CommandInteraction,
): Promise<string | InteractionReplyOptions> {
const ping = this.client.ws.ping;

View File

@ -18,6 +18,7 @@ export class StopPlaybackCommand implements DiscordCommand {
private readonly discordMessageService: DiscordMessageService,
private readonly discordVoiceService: DiscordVoiceService,
) {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
handler(CommandInteraction: CommandInteraction): GenericCustomReply {
this.playbackService.clear();
this.discordVoiceService.stop(false);

View File

@ -2,7 +2,6 @@ import {
Catch,
DiscordArgumentMetadata,
DiscordExceptionFilter,
On,
} from '@discord-nestjs/core';
import { Logger } from '@nestjs/common';
import {
@ -10,9 +9,6 @@ import {
ButtonBuilder,
ButtonStyle,
CommandInteraction,
ComponentBuilder,
Events,
Interaction,
} from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { Constants } from '../utils/constants';

View File

@ -7,7 +7,6 @@ import { Track } from '../types/track';
import { trimStringToFixedLength } from '../utils/stringUtils';
import { Logger } from '@nestjs/common';
import { v4 as uuidv4 } from 'uuid';
import { JellyfinSearchService } from '../clients/jellyfin/jellyfin.search.service';
export interface BaseJellyfinAudioPlayable {

View File

@ -1,3 +1,3 @@
export interface EnvironmentVariablesType {
DISCORD_CLIENT_TOKEN: string;
}
}

View File

@ -62,7 +62,7 @@ export class UpdatesService {
const isoDate = parseISO(latestVersion.published_at);
const relativeReadable = formatRelative(isoDate, new Date());
guilds.forEach(async (guild, key) => {
guilds.forEach(async (guild) => {
const owner = await guild.fetchOwner();
await owner.send({