web: update to new formatting rules, make eslint warnings fail ci

This commit is contained in:
Jens Langhammer
2020-12-01 17:27:19 +01:00
parent 7195b77606
commit e6391b64f0
33 changed files with 192 additions and 259 deletions

View File

@ -1,3 +1,5 @@
import { html, TemplateResult } from "lit-html";
export function getCookie(name: string): string | undefined {
let cookieValue = undefined;
if (document.cookie && document.cookie !== "") {
@ -28,3 +30,7 @@ export function truncate(input?: string, max = 10): string {
return array.slice(0, max).join(" ") + ellipsis;
}
export function htmlFromString(...strings: string[]): TemplateResult {
return html({ raw: strings, ...strings } as TemplateStringsArray);
}