Fix some linting errors.

This commit is contained in:
Manuel Friedli 2019-05-10 00:21:45 +02:00
parent 133287988e
commit 0d33434dbf
5 changed files with 12 additions and 12 deletions

View File

@ -21,7 +21,7 @@ export class CookieHandler {
getLayout(): string {
const oldCookie = this.getCookie('uhr-language');
if (!!oldCookie) {
if (oldCookie) {
// aha, old cookie is set. migrate to new one!
this.removeCookie('uhr-language');
this.setLayout(oldCookie);
@ -64,7 +64,7 @@ export class CookieHandler {
private setCookie(cookieName: string, cookieValue: string): void {
let options;
if (!!this.cookiePath) {
if (this.cookiePath) {
options = {expires: 365, path: this.cookiePath};
} else {
options = {expires: 365};
@ -73,7 +73,7 @@ export class CookieHandler {
}
private removeCookie(cookieName: string): void {
if (!!this.cookiePath) {
if (this.cookiePath) {
Cookies.remove(cookieName + this.widgetId, {path: this.cookiePath});
} else {
Cookies.remove(cookieName + this.widgetId);

View File

@ -24,7 +24,7 @@ export class Letter {
constructor(value: string, style?: string) {
this.value = value;
if (!!style) {
if (style) {
this.style = style;
}
}
@ -35,9 +35,9 @@ export class Letter {
} else {
this.style += ` ${style}`;
}
};
}
toString(): string {
return `<span class="item letter ${this.style}">${this.value}</span>`;
};
}
}

View File

@ -245,7 +245,7 @@ class LayoutRendererV2Delegate {
this.parseTimeDefinition(letters, 'minute', this.layout.minutes);
this.parseTimeDefinition(letters, 'hour', this.layout.hours);
return letters;
};
}
private parseObject(letters: Letter[][], styleClass: string, object: WordDefinition): void {
if (typeof object !== 'undefined' && object !== null) {
@ -313,10 +313,10 @@ export class LayoutRenderer {
this.renderarea.append('<br/>');
}
});
if (!!beforeshow) {
if (beforeshow) {
beforeshow();
}
this.renderarea.fadeIn('fast');
});
};
}
}

View File

@ -97,7 +97,7 @@ export class UhrRenderer {
configlink.on({click: () => this.toggleConfigScreen()});
this.$element.after(configlink);
}
};
}
private wireFunctionality(): void {
// on/off switch
@ -203,5 +203,5 @@ export class UhrRenderer {
private toggleConfigScreen() {
$(`#uhr-controlpanel${this.id}`).toggle('fast');
};
}
}

View File

@ -42,7 +42,7 @@ export class Uhr {
}
destroy(): void {
if (!!this.timer) {
if (this.timer) {
window.clearInterval(this.timer);
this.timer = null;
}