From 7af75da41ba32451c3e9564714b05b506bdd881d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Feb 2017 11:51:51 +0100 Subject: Client: fix lint --- client/config/webpack.common.js | 1 - client/src/app/+admin/friends/friend-list/friend-list.component.ts | 4 ++-- client/src/app/+admin/users/user-list/user-list.component.ts | 2 +- .../video-abuses/video-abuse-list/video-abuse-list.component.ts | 4 ++-- client/src/app/core/confirm/confirm.service.ts | 2 +- client/src/app/shared/rest/rest-data-source.ts | 4 ++-- client/src/app/shared/utils.ts | 2 +- client/src/app/videos/video-watch/video-report.component.ts | 2 +- client/src/app/videos/video-watch/webtorrent.service.ts | 4 ++-- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js index 2d227f6f8..08b8a4b09 100644 --- a/client/config/webpack.common.js +++ b/client/config/webpack.common.js @@ -8,7 +8,6 @@ const AssetsPlugin = require('assets-webpack-plugin') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin') const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin') -const ProvidePlugin = require('webpack/lib/ProvidePlugin') const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin') const CopyWebpackPlugin = require('copy-webpack-plugin') const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin diff --git a/client/src/app/+admin/friends/friend-list/friend-list.component.ts b/client/src/app/+admin/friends/friend-list/friend-list.component.ts index f29427640..9783adf16 100644 --- a/client/src/app/+admin/friends/friend-list/friend-list.component.ts +++ b/client/src/app/+admin/friends/friend-list/friend-list.component.ts @@ -45,7 +45,7 @@ export class FriendListComponent { valuePrepareFunction: Utils.dateToHuman } } - } + }; constructor( private notificationsService: NotificationsService, @@ -56,7 +56,7 @@ export class FriendListComponent { } hasFriends() { - return this.friendsSource.count() != 0; + return this.friendsSource.count() !== 0; } quitFriends() { diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts index db025d3a8..c27b96e28 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/users/user-list/user-list.component.ts @@ -49,7 +49,7 @@ export class UserListComponent { valuePrepareFunction: Utils.dateToHuman } } - } + }; constructor( private notificationsService: NotificationsService, diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts index 2f22a4ab0..f59c4fffb 100644 --- a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts +++ b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts @@ -2,7 +2,7 @@ import { Component } from '@angular/core'; import { NotificationsService } from 'angular2-notifications'; -import { Utils, VideoAbuseService, VideoAbuse} from '../../../shared'; +import { Utils, VideoAbuseService, VideoAbuse } from '../../../shared'; @Component({ selector: 'my-video-abuse-list', @@ -55,7 +55,7 @@ export class VideoAbuseListComponent { valuePrepareFunction: Utils.dateToHuman } } - } + }; constructor( private notificationsService: NotificationsService, diff --git a/client/src/app/core/confirm/confirm.service.ts b/client/src/app/core/confirm/confirm.service.ts index b97969795..08127a66f 100644 --- a/client/src/app/core/confirm/confirm.service.ts +++ b/client/src/app/core/confirm/confirm.service.ts @@ -7,7 +7,7 @@ export class ConfirmService { showConfirm = new Subject<{ title, message }>(); confirmResponse = new Subject(); - confirm(message: string = '', title: string = '') { + confirm(message = '', title = '') { this.showConfirm.next({ title, message }); return this.confirmResponse.asObservable().first(); diff --git a/client/src/app/shared/rest/rest-data-source.ts b/client/src/app/shared/rest/rest-data-source.ts index 847dd7c56..1def38c73 100644 --- a/client/src/app/shared/rest/rest-data-source.ts +++ b/client/src/app/shared/rest/rest-data-source.ts @@ -8,14 +8,14 @@ export class RestDataSource extends ServerDataSource { endPoint: endpoint, sortFieldKey: 'sort', dataKey: 'data' - } + }; super(http, options); } protected extractTotalFromResponse(res) { const rawData = res.json(); - return rawData ? parseInt(rawData.total): 0; + return rawData ? parseInt(rawData.total) : 0; } protected addSortRequestOptions(requestOptions: RequestOptionsArgs) { diff --git a/client/src/app/shared/utils.ts b/client/src/app/shared/utils.ts index 1dd6f96f0..5ab41fe5a 100644 --- a/client/src/app/shared/utils.ts +++ b/client/src/app/shared/utils.ts @@ -3,7 +3,7 @@ import { DatePipe } from '@angular/common'; export class Utils { static dateToHuman(date: String) { - return new DatePipe('en').transform(date, 'medium') + return new DatePipe('en').transform(date, 'medium'); } static getRowDeleteButton() { diff --git a/client/src/app/videos/video-watch/video-report.component.ts b/client/src/app/videos/video-watch/video-report.component.ts index 7906fdb5c..c4cf936ce 100644 --- a/client/src/app/videos/video-watch/video-report.component.ts +++ b/client/src/app/videos/video-watch/video-report.component.ts @@ -54,7 +54,7 @@ export class VideoReportComponent extends FormReactive implements OnInit { } report() { - const reason = this.form.value['reason'] + const reason = this.form.value['reason']; this.videoAbuseService.reportVideo(this.video.id, reason) .subscribe( diff --git a/client/src/app/videos/video-watch/webtorrent.service.ts b/client/src/app/videos/video-watch/webtorrent.service.ts index 1839c7c27..0192167ee 100644 --- a/client/src/app/videos/video-watch/webtorrent.service.ts +++ b/client/src/app/videos/video-watch/webtorrent.service.ts @@ -15,8 +15,8 @@ export class WebTorrentService { constructor() { this.client = new WebTorrent({ dht: false }); - this.client.on('error', (err) => this.errors.next(err)) - this.client.on('warning', (err) => this.warnings.next(err)) + this.client.on('error', (err) => this.errors.next(err)); + this.client.on('warning', (err) => this.warnings.next(err)); } add(magnetUri: string, callback: Function) { -- cgit v1.2.3