From 0543a36f09add7578bce4eb0e8239fdadb92513b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Mon, 12 Aug 2019 16:58:24 +0200 Subject: [PATCH] Fix tslint errors --- src/app/dashboard/dashboard.component.ts | 9 +++++---- src/app/ide/ide.component.ts | 2 +- src/app/messages/messages.component.ts | 2 +- src/app/services/processmanager.service.ts | 2 +- tslint.json | 4 +--- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 68eb360..1550db7 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -131,7 +131,7 @@ export class DashboardComponent implements OnInit, OnDestroy { // Sometimes it is needed to reload the iframe without resending the previous form data setTimeout(() => { this.webiframe.nativeElement.contentWindow.location = this.webiframe.nativeElement.contentWindow.location.href; - }) + }); } selectTerminalMenuItem(item: string) { @@ -165,12 +165,13 @@ export class DashboardComponent implements OnInit, OnDestroy { changeIframeURL() { const userGivenValue = this.urlbar.nativeElement.value.trim(); - if( - userGivenValue == '/' || + if ( + userGivenValue === '/' || userGivenValue.startsWith('dashboard') || userGivenValue.startsWith('/dashboard') - ) + ) { return; + } this.webiframe.nativeElement.contentWindow.frames.location.href = this.urlbar.nativeElement.value; } diff --git a/src/app/ide/ide.component.ts b/src/app/ide/ide.component.ts index 2b7a221..66f8819 100644 --- a/src/app/ide/ide.component.ts +++ b/src/app/ide/ide.component.ts @@ -112,7 +112,7 @@ export class IdeComponent implements OnInit { readHandler(message: IDEMessage) { if (this.codeState === CodeState.SAVED) { - if (this.filename != message.filename) { + if (this.filename !== message.filename) { this.filename = message.filename; } this.code = (message.content != null) ? message.content : this.code; diff --git a/src/app/messages/messages.component.ts b/src/app/messages/messages.component.ts index c6f78cc..e6f8f9f 100644 --- a/src/app/messages/messages.component.ts +++ b/src/app/messages/messages.component.ts @@ -16,7 +16,7 @@ export class MessagesComponent implements OnInit { newMessage: Subject = new Subject(); messageInQueue = true; - originator: string = 'avataobot'; + originator = 'avataobot'; messages: MessageData[] = []; messageQueueAttender: MessageQueueAttender; diff --git a/src/app/services/processmanager.service.ts b/src/app/services/processmanager.service.ts index 31d38e0..eb7bc6b 100644 --- a/src/app/services/processmanager.service.ts +++ b/src/app/services/processmanager.service.ts @@ -45,7 +45,7 @@ export class ProcessManagerService { sendCommand(command: string, process_name: string) { this.webSocketService.sendJSON({ - 'key': 'process.'+command, + 'key': 'process.' + command, 'name': process_name }); } diff --git a/tslint.json b/tslint.json index f445971..d31c754 100644 --- a/tslint.json +++ b/tslint.json @@ -56,7 +56,7 @@ "no-debugger": true, "no-duplicate-super": true, "no-empty": false, - "no-empty-interface": true, + "no-empty-interface": false, "no-eval": true, "no-inferrable-types": [ true, @@ -71,7 +71,6 @@ "no-trailing-whitespace": true, "no-unnecessary-initializer": true, "no-unused-expression": true, - "no-use-before-declare": true, "no-var-keyword": true, "object-literal-sort-keys": false, "one-line": [ @@ -105,7 +104,6 @@ "variable-declaration": "nospace" } ], - "typeof-compare": true, "unified-signatures": true, "variable-name": false, "whitespace": [