From 9df52d660feb722404be00a50f3c8a612bec1c15 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 14:42:53 +0200 Subject: Migrate client to eslint --- .../shared-video-playlist/video-add-to-playlist.component.ts | 2 +- .../shared-video-playlist/video-playlist-element.model.ts | 2 +- .../app/shared/shared-video-playlist/video-playlist.model.ts | 2 +- .../app/shared/shared-video-playlist/video-playlist.service.ts | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'client/src/app/shared/shared-video-playlist') diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts index df3aeddb7..553930595 100644 --- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts @@ -191,7 +191,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit, } createPlaylist () { - const displayName = this.form.value[ 'displayName' ] + const displayName = this.form.value['displayName'] const videoPlaylistCreate: VideoPlaylistCreate = { displayName, diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts index f25f10ede..b661378bd 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts @@ -11,7 +11,7 @@ export class VideoPlaylistElement implements ServerVideoPlaylistElement { video?: Video - constructor (hash: ServerVideoPlaylistElement, translations: {}) { + constructor (hash: ServerVideoPlaylistElement, translations: { [ id: string ]: string } = {}) { this.id = hash.id this.position = hash.position this.startTimestamp = hash.startTimestamp diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts index fcc2ce705..6b38d9ca3 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts @@ -48,7 +48,7 @@ export class VideoPlaylist implements ServerVideoPlaylist { return buildPlaylistWatchPath({ shortUUID: playlist.shortUUID || playlist.uuid }) } - constructor (hash: ServerVideoPlaylist, translations: {}) { + constructor (hash: ServerVideoPlaylist, translations: { [ id: string ]: string }) { const absoluteAPIUrl = getAbsoluteAPIUrl() this.id = hash.id diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts index a3f1393ff..0a01af593 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts @@ -279,18 +279,18 @@ export class VideoPlaylistService { } listenToVideoPlaylistChange (videoId: number) { - if (this.videoExistsObservableCache[ videoId ]) { - return this.videoExistsObservableCache[ videoId ] + if (this.videoExistsObservableCache[videoId]) { + return this.videoExistsObservableCache[videoId] } const obs = this.videoExistsInPlaylistObservable .pipe( - map(existsResult => existsResult[ videoId ]), + map(existsResult => existsResult[videoId]), filter(r => !!r), - tap(result => this.videoExistsCache[ videoId ] = result) + tap(result => this.videoExistsCache[videoId] = result) ) - this.videoExistsObservableCache[ videoId ] = obs + this.videoExistsObservableCache[videoId] = obs return obs } -- cgit v1.2.3