1
0
Fork 0

Lint code.

This commit is contained in:
Kitteh 2021-05-08 03:40:44 +01:00
parent 8a33dfd36f
commit 40387b5a48
3 changed files with 7 additions and 7 deletions

View file

@ -44,7 +44,7 @@ interface ElementInfo {
[propName: string]: any;
}
export function makeElement(elementInfo: ElementInfo) {
export function makeElement(elementInfo: ElementInfo): HTMLElement {
if ("condition" in elementInfo) { if (!elementInfo.condition) { return null; } }
const element = document.createElement(elementInfo.tag);
@ -57,7 +57,7 @@ export function makeElement(elementInfo: ElementInfo) {
return element;
}
export function setElementAttributes(element: Element, attributes: {[propName: string]: any}) {
export function setElementAttributes(element: Element, attributes: {[propName: string]: any}): void {
for (const key of Object.getOwnPropertyNames(attributes)) {
element.setAttribute(key, attributes[key]);
}

View file

@ -24,7 +24,7 @@ export class KeyValueViewPage extends Page {
setTitleElement(pageState);
let kvViewPageContent = makeElement({ tag: "div" });
const kvViewPageContent = makeElement({ tag: "div" });
setPageContent(kvViewPageContent);
if (pageState.currentMountType == "cubbyhole") {
@ -34,7 +34,7 @@ export class KeyValueViewPage extends Page {
}));
}
let newButton = makeElement({
const newButton = makeElement({
tag: "button",
text: i18next.t("kv_view_new_btn"),
class: ["uk-button", "uk-button-primary", "uk-margin-bottom"],
@ -45,7 +45,7 @@ export class KeyValueViewPage extends Page {
kvViewPageContent.appendChild(newButton);
try {
let res = await getSecrets(
const res = await getSecrets(
pageState.currentBaseMount,
pageState.currentMountType,
pageState.currentSecretPath,

View file

@ -15,8 +15,8 @@ export class Page {
}
goBack(): void {
changePage("HOME");
};
}
cleanup(): void {
// Do Nothing
};
}
}