Improved code quality (#154)

* Removed package-lock.json form gitignore as it ensures specific package versions

* Updated all @angular web dependencies

* Resolved tslint errors using autofix option

* Resolved some more tslint issues

* Added lint scripts to package.json to easy lint the ts files

* Updated codelyzer and tslint

* Run web on travis using node 10 and run the lint task

* Resolved some more tslint issues after upgrading tslint and codelyzer

* Resolved golint issues with regards to exchange comments

* Resolved spelling errors shown by goreportcard.com

* Resolved gofmt warnings using goreportcard.com

* Resolved golint issue by removing unrequired else statement

* Refactored slack.go to reduce cyclomatic complexity

* Fixed govet issue where Slack was passed as value instead of reference
This commit is contained in:
Marco Franssen
2018-07-18 07:46:47 +02:00
committed by Adrian Gallagher
parent a5f51328d4
commit 0f209165d5
71 changed files with 970 additions and 916 deletions

View File

@@ -6,16 +6,16 @@ export class WebSocketMessage {
public error: string;
public static CreateAuthenticationMessage(): WebSocketMessage {
var response = new WebSocketMessage();
const response = new WebSocketMessage();
response.event = WebSocketMessageType.Auth;
response.data = { "username": window.sessionStorage["username"], "password": window.sessionStorage["password"] };
response.data = { 'username': window.sessionStorage['username'], 'password': window.sessionStorage['password'] };
return response;
};
}
public static GetSettingsMessage() : WebSocketMessage {
var response = new WebSocketMessage();
public static GetSettingsMessage(): WebSocketMessage {
const response = new WebSocketMessage();
response.event = WebSocketMessageType.GetConfig;
response.data = null;
@@ -25,9 +25,9 @@ export class WebSocketMessage {
}
export class WebSocketMessageType {
public static Auth: string = "auth";
public static GetConfig: string = "GetConfig";
public static SaveConfig: string = "SaveConfig";
public static GetPortfolio: string = "GetPortfolio";
public static TickerUpdate: string = "ticker_update";
public static Auth = 'auth';
public static GetConfig = 'GetConfig';
public static SaveConfig = 'SaveConfig';
public static GetPortfolio = 'GetPortfolio';
public static TickerUpdate = 'ticker_update';
}