From 6f37929f991089a02be0f949a8ec10fb08abdd77 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:35:54 +1100 Subject: [PATCH 1/2] Enable typescript-eslint strict checks --- eslint.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index f73f483d..aa409754 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -11,7 +11,7 @@ export default [ eslint.configs.recommended, jsdoc.configs['flat/recommended'], eslintPluginPrettierRecommended, - ...tseslint.configs.recommended, + ...tseslint.configs.strict, promise.configs['flat/recommended'], importPlugin.flatConfigs.errors, importPlugin.flatConfigs.warnings, From 95ddd5deb8f29aa63cabb729110537be0de31d1c Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:36:26 +1100 Subject: [PATCH 2/2] Ignore existing violations of typescript-eslint strict rules --- src/components/commandHandler.ts | 1 + src/components/credentialManager.ts | 1 + src/components/documentManager.ts | 1 + src/components/jellyfinApi.ts | 1 + src/components/playbackManager.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/src/components/commandHandler.ts b/src/components/commandHandler.ts index 4e44a0a9..668fe033 100644 --- a/src/components/commandHandler.ts +++ b/src/components/commandHandler.ts @@ -21,6 +21,7 @@ import { reportPlaybackProgress } from './jellyfinActions'; import { PlaybackManager } from './playbackManager'; import { DocumentManager } from './documentManager'; +// eslint-disable-next-line @typescript-eslint/no-extraneous-class export abstract class CommandHandler { private static playerManager: framework.PlayerManager; private static supportedCommands: SupportedCommands = { diff --git a/src/components/credentialManager.ts b/src/components/credentialManager.ts index 4306798c..953c4d77 100644 --- a/src/components/credentialManager.ts +++ b/src/components/credentialManager.ts @@ -74,6 +74,7 @@ export class credentialManager { */ remove(serverId: string): boolean { if (serverId in this.credentialStore) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete this.credentialStore[serverId]; return true; diff --git a/src/components/documentManager.ts b/src/components/documentManager.ts index f8f8fd71..66302741 100644 --- a/src/components/documentManager.ts +++ b/src/components/documentManager.ts @@ -4,6 +4,7 @@ import { parseISO8601Date, TicksPerSecond, ticksToSeconds } from '../helpers'; import { JellyfinApi } from './jellyfinApi'; import { deviceIds, getActiveDeviceId } from './castDevices'; +// eslint-disable-next-line @typescript-eslint/no-extraneous-class export abstract class DocumentManager { // Duration between each backdrop switch in ms private static backdropPeriodMs: number | null = 30000; diff --git a/src/components/jellyfinApi.ts b/src/components/jellyfinApi.ts index af31222a..eaaf2782 100644 --- a/src/components/jellyfinApi.ts +++ b/src/components/jellyfinApi.ts @@ -1,6 +1,7 @@ import { version as packageVersion } from '../../package.json'; import { ajax } from './fetchhelper'; +// eslint-disable-next-line @typescript-eslint/no-extraneous-class export abstract class JellyfinApi { // userId that we are connecting as currently public static userId: string | undefined; diff --git a/src/components/playbackManager.ts b/src/components/playbackManager.ts index c8152229..8588d35d 100644 --- a/src/components/playbackManager.ts +++ b/src/components/playbackManager.ts @@ -51,6 +51,7 @@ export interface PlaybackState { runtimeTicks: number; } +// eslint-disable-next-line @typescript-eslint/no-extraneous-class export abstract class PlaybackManager { private static playerManager: framework.PlayerManager; private static activePlaylist: Array;