From c47106315ae3c403239cda29c49b4bba51ddccb2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 2 Apr 2019 18:30:26 +0200 Subject: tslint update --- client/src/app/+accounts/accounts.component.ts | 1 - .../video-channel-playlists/video-channel-playlists.component.html | 2 +- client/src/app/shared/forms/form-reactive.ts | 2 +- client/src/app/shared/misc/utils.ts | 4 ++-- client/src/app/shared/renderer/markdown.service.ts | 2 +- .../video-playlist/video-playlist-element-miniature.component.html | 4 ++-- .../app/shared/video-playlist/video-playlist-miniature.component.html | 2 +- client/src/app/videos/+video-watch/video-watch.component.html | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index e8339b78b..d9786fb5c 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts @@ -7,7 +7,6 @@ import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/oper import { Subscription } from 'rxjs' import { AuthService, Notifier, RedirectService } from '@app/core' import { User, UserRight } from '../../../../shared' -import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ templateUrl: './accounts.component.html', diff --git a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html index 0d9fba375..befc7143c 100644 --- a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html +++ b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html @@ -1,5 +1,5 @@
- Created {{pagination.totalItems}} playlists + Created {{ pagination.totalItems }} playlists
This channel does not have playlists.
diff --git a/client/src/app/shared/forms/form-reactive.ts b/client/src/app/shared/forms/form-reactive.ts index b9873af2c..0d40b6f4a 100644 --- a/client/src/app/shared/forms/form-reactive.ts +++ b/client/src/app/shared/forms/form-reactive.ts @@ -59,7 +59,7 @@ export abstract class FormReactive { const isDirty = control.dirty || forceCheck === true if (control && isDirty && !control.valid) { const messages = validationMessages[ field ] - for (const key in control.errors) { + for (const key of Object.keys(control.errors)) { formErrors[ field ] += messages[ key ] + ' ' } } diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts index 8a1d342c9..85fc1c3a0 100644 --- a/client/src/app/shared/misc/utils.ts +++ b/client/src/app/shared/misc/utils.ts @@ -78,10 +78,10 @@ function objectToUrlEncoded (obj: any) { // Thanks: https://gist.github.com/ghinda/8442a57f22099bdb2e34 function objectToFormData (obj: any, form?: FormData, namespace?: string) { - let fd = form || new FormData() + const fd = form || new FormData() let formKey - for (let key of Object.keys(obj)) { + for (const key of Object.keys(obj)) { if (namespace) formKey = `${namespace}[${key}]` else formKey = key diff --git a/client/src/app/shared/renderer/markdown.service.ts b/client/src/app/shared/renderer/markdown.service.ts index 69dc60aaf..9a9066351 100644 --- a/client/src/app/shared/renderer/markdown.service.ts +++ b/client/src/app/shared/renderer/markdown.service.ts @@ -45,7 +45,7 @@ export class MarkdownService { const markdownIt = new MarkdownItClass('zero', { linkify: true, breaks: true }) - for (let rule of rules) { + for (const rule of rules) { markdownIt.enable(rule) } diff --git a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.html b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.html index 4764fc0e1..ab5a78928 100644 --- a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.html +++ b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.html @@ -19,7 +19,7 @@ {{ video.byAccount }} {{ video.byAccount }} - {{ formatTimestamp(video)}} + {{ formatTimestamp(video) }} @@ -66,7 +66,7 @@ - Delete from {{playlist?.displayName}} + Delete from {{ playlist?.displayName }} diff --git a/client/src/app/shared/video-playlist/video-playlist-miniature.component.html b/client/src/app/shared/video-playlist/video-playlist-miniature.component.html index c01c73012..faf906c59 100644 --- a/client/src/app/shared/video-playlist/video-playlist-miniature.component.html +++ b/client/src/app/shared/video-playlist/video-playlist-miniature.component.html @@ -6,7 +6,7 @@
- {playlist.videosLength, plural, =0 {No videos} =1 {1 video} other {{{playlist.videosLength}} videos}} + {playlist.videosLength, plural, =0 {No videos} =1 {1 video} other {{{ playlist.videosLength }} videos}}
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 91f77cbf3..ad1d04b70 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html @@ -22,7 +22,7 @@
{{ playlist.ownerBy }}
- {{currentPlaylistPosition}}{{playlistPagination.totalItems}} + {{ currentPlaylistPosition }}{{ playlistPagination.totalItems }}
-- cgit v1.2.3