Client: fix lint

pull/40/head
Chocobozzz 2017-02-10 11:51:51 +01:00
parent f6f7dfee01
commit 7af75da41b
9 changed files with 12 additions and 13 deletions

View File

@ -8,7 +8,6 @@ const AssetsPlugin = require('assets-webpack-plugin')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin') const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin')
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin') const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin')
const ProvidePlugin = require('webpack/lib/ProvidePlugin')
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin') const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin')
const CopyWebpackPlugin = require('copy-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin')
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin

View File

@ -45,7 +45,7 @@ export class FriendListComponent {
valuePrepareFunction: Utils.dateToHuman valuePrepareFunction: Utils.dateToHuman
} }
} }
} };
constructor( constructor(
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
@ -56,7 +56,7 @@ export class FriendListComponent {
} }
hasFriends() { hasFriends() {
return this.friendsSource.count() != 0; return this.friendsSource.count() !== 0;
} }
quitFriends() { quitFriends() {

View File

@ -49,7 +49,7 @@ export class UserListComponent {
valuePrepareFunction: Utils.dateToHuman valuePrepareFunction: Utils.dateToHuman
} }
} }
} };
constructor( constructor(
private notificationsService: NotificationsService, private notificationsService: NotificationsService,

View File

@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { NotificationsService } from 'angular2-notifications'; import { NotificationsService } from 'angular2-notifications';
import { Utils, VideoAbuseService, VideoAbuse} from '../../../shared'; import { Utils, VideoAbuseService, VideoAbuse } from '../../../shared';
@Component({ @Component({
selector: 'my-video-abuse-list', selector: 'my-video-abuse-list',
@ -55,7 +55,7 @@ export class VideoAbuseListComponent {
valuePrepareFunction: Utils.dateToHuman valuePrepareFunction: Utils.dateToHuman
} }
} }
} };
constructor( constructor(
private notificationsService: NotificationsService, private notificationsService: NotificationsService,

View File

@ -7,7 +7,7 @@ export class ConfirmService {
showConfirm = new Subject<{ title, message }>(); showConfirm = new Subject<{ title, message }>();
confirmResponse = new Subject<boolean>(); confirmResponse = new Subject<boolean>();
confirm(message: string = '', title: string = '') { confirm(message = '', title = '') {
this.showConfirm.next({ title, message }); this.showConfirm.next({ title, message });
return this.confirmResponse.asObservable().first(); return this.confirmResponse.asObservable().first();

View File

@ -8,14 +8,14 @@ export class RestDataSource extends ServerDataSource {
endPoint: endpoint, endPoint: endpoint,
sortFieldKey: 'sort', sortFieldKey: 'sort',
dataKey: 'data' dataKey: 'data'
} };
super(http, options); super(http, options);
} }
protected extractTotalFromResponse(res) { protected extractTotalFromResponse(res) {
const rawData = res.json(); const rawData = res.json();
return rawData ? parseInt(rawData.total): 0; return rawData ? parseInt(rawData.total) : 0;
} }
protected addSortRequestOptions(requestOptions: RequestOptionsArgs) { protected addSortRequestOptions(requestOptions: RequestOptionsArgs) {

View File

@ -3,7 +3,7 @@ import { DatePipe } from '@angular/common';
export class Utils { export class Utils {
static dateToHuman(date: String) { static dateToHuman(date: String) {
return new DatePipe('en').transform(date, 'medium') return new DatePipe('en').transform(date, 'medium');
} }
static getRowDeleteButton() { static getRowDeleteButton() {

View File

@ -54,7 +54,7 @@ export class VideoReportComponent extends FormReactive implements OnInit {
} }
report() { report() {
const reason = this.form.value['reason'] const reason = this.form.value['reason'];
this.videoAbuseService.reportVideo(this.video.id, reason) this.videoAbuseService.reportVideo(this.video.id, reason)
.subscribe( .subscribe(

View File

@ -15,8 +15,8 @@ export class WebTorrentService {
constructor() { constructor() {
this.client = new WebTorrent({ dht: false }); this.client = new WebTorrent({ dht: false });
this.client.on('error', (err) => this.errors.next(err)) this.client.on('error', (err) => this.errors.next(err));
this.client.on('warning', (err) => this.warnings.next(err)) this.client.on('warning', (err) => this.warnings.next(err));
} }
add(magnetUri: string, callback: Function) { add(magnetUri: string, callback: Function) {