From 53bf0be280b9387c804098f75574b8402ebf8c0c Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Tue, 28 Jun 2022 08:39:10 -0500 Subject: [PATCH] chore(lint): fix lint issues (#3743) Co-authored-by: Nate Moore --- packages/create-astro/src/index.ts | 2 +- packages/integrations/prefetch/src/client.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index df676fbfb..fba9b710c 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -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); } diff --git a/packages/integrations/prefetch/src/client.ts b/packages/integrations/prefetch/src/client.ts index 9f951c8dd..fae2db54a 100644 --- a/packages/integrations/prefetch/src/client.ts +++ b/packages/integrations/prefetch/src/client.ts @@ -1,4 +1,4 @@ -/// +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('link[rel="stylesheet"]')); - await Promise.all(styles.map(({ href }) => fetch(href))); + await Promise.all(styles.map((el) => fetch(el.href))); } catch {} }