chore: update * pin prettier version & format code

This commit is contained in:
M. George Hansen 2021-01-02 13:40:18 -08:00
parent 274fe7778e
commit 45d96fae9f
18 changed files with 93 additions and 78 deletions

View file

@ -63,7 +63,7 @@ const startTag = (elem: HTMLElement): string => {
output += ` ${normalizedAttrName}=""`;
} else {
output += ` ${normalizedAttrName}="${escapeAttr(
attrValue.toString()
attrValue.toString(),
)}"`;
}
}
@ -94,13 +94,13 @@ export const renderPage = (rootElem: Element): string => {
if (typeof rootElem !== "object" || !("tag" in rootElem)) {
throw new Error(
`root page element must be a valid HTMLElement, got ${JSON.stringify(
rootElem
)}`
rootElem,
)}`,
);
}
if (rootElem.tag.toLowerCase() !== "html") {
throw new Error(
`attempted to render page with non-HTML root element ${rootElem.tag}`
`attempted to render page with non-HTML root element ${rootElem.tag}`,
);
}