chore(lint): fix lint issues (#3743)
Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
parent
768c8ed21d
commit
53bf0be280
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ import { TEMPLATES } from './templates.js';
|
|||
function wait(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
function logAndWait(message: string, ms: number = 100) {
|
||||
function logAndWait(message: string, ms = 100) {
|
||||
console.log(message);
|
||||
return wait(ms);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference path="../@types/network-information.d.ts" />
|
||||
import "../@types/network-information.d.ts";
|
||||
import throttles from 'throttles';
|
||||
import requestIdleCallback from './requestIdleCallback.js';
|
||||
|
||||
|
@ -53,7 +53,7 @@ async function preloadHref(link: HTMLAnchorElement) {
|
|||
const html = parser.parseFromString(contents, 'text/html');
|
||||
const styles = Array.from(html.querySelectorAll<HTMLLinkElement>('link[rel="stylesheet"]'));
|
||||
|
||||
await Promise.all(styles.map(({ href }) => fetch(href)));
|
||||
await Promise.all(styles.map((el) => fetch(el.href)));
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue