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 --- .../+video-watch/shared/comment/video-comment-add.component.ts | 6 +++--- .../+video-watch/shared/comment/video-comment.component.html | 2 +- .../+video-watch/shared/comment/video-comment.component.ts | 2 +- .../+video-watch/shared/comment/video-comments.component.ts | 8 ++++++-- 4 files changed, 11 insertions(+), 7 deletions(-) (limited to 'client/src/app/+videos/+video-watch/shared/comment') diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts index ac65f7260..71fb127f6 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts @@ -25,7 +25,7 @@ import { VideoCommentCreate } from '@shared/models' @Component({ selector: 'my-video-comment-add', templateUrl: './video-comment-add.component.html', - styleUrls: ['./video-comment-add.component.scss'] + styleUrls: [ './video-comment-add.component.scss' ] }) export class VideoCommentAddComponent extends FormReactive implements OnChanges, OnInit { @Input() user: User @@ -64,7 +64,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, for (const emojiMarkupName in emojiMarkupObjectList) { if (emojiMarkupName) { const emoji = emojiMarkupObjectList[emojiMarkupName] - emojiMarkupArrayList.push([emoji, emojiMarkupName]) + emojiMarkupArrayList.push([ emoji, emojiMarkupName ]) } } @@ -91,7 +91,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, // Not initialized yet if (!this.form) return - if (changes.textValue && changes.textValue.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) { + if (changes.textValue?.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) { this.patchTextValue(changes.textValue.currentValue, true) } } diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html index d8b944b35..d0e9bcd29 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html @@ -29,7 +29,7 @@ class="comment-html" [innerHTML]="sanitizedCommentHTML" (timestampClicked)="handleTimestampClicked($event)" - timestampRouteTransformer + myTimestampRouteTransformer >
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts index f858f4750..5bbcffe82 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts @@ -10,7 +10,7 @@ import { User, UserRight } from '@shared/models' @Component({ selector: 'my-video-comment', templateUrl: './video-comment.component.html', - styleUrls: ['./video-comment.component.scss'] + styleUrls: [ './video-comment.component.scss' ] }) export class VideoCommentComponent implements OnInit, OnChanges { @ViewChild('commentReportModal') commentReportModal: CommentReportComponent diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts index 72866b874..17e0af3bc 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts @@ -9,7 +9,7 @@ import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/ @Component({ selector: 'my-video-comments', templateUrl: './video-comments.component.html', - styleUrls: ['./video-comments.component.scss'] + styleUrls: [ './video-comments.component.scss' ] }) export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { @ViewChild('commentHighlightBlock') commentHighlightBlock: ElementRef @@ -200,7 +200,11 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { } async onWantedToRedraft (commentToRedraft: VideoComment) { - const confirm = await this.onWantedToDelete(commentToRedraft, $localize`Delete and re-draft`, $localize`Do you really want to delete and re-draft this comment?`) + const confirm = await this.onWantedToDelete( + commentToRedraft, + $localize`Delete and re-draft`, + $localize`Do you really want to delete and re-draft this comment?` + ) if (confirm) { this.inReplyToCommentId = commentToRedraft.inReplyToCommentId -- cgit v1.2.3