Lint code.
This commit is contained in:
parent
8a33dfd36f
commit
40387b5a48
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -15,8 +15,8 @@ export class Page {
|
|||
}
|
||||
goBack(): void {
|
||||
changePage("HOME");
|
||||
};
|
||||
}
|
||||
cleanup(): void {
|
||||
// Do Nothing
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue