From 85de47cd982fd13c6286bcc0be384a220996ccbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Thu, 8 Aug 2024 09:54:55 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/assets/endpoint/node.ts | 2 +- packages/astro/src/runtime/server/render/component.ts | 4 +--- packages/astro/src/transitions/router.ts | 2 +- packages/astro/src/vite-plugin-load-fallback/index.ts | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/assets/endpoint/node.ts b/packages/astro/src/assets/endpoint/node.ts index b9db047f86..ecbb75179b 100644 --- a/packages/astro/src/assets/endpoint/node.ts +++ b/packages/astro/src/assets/endpoint/node.ts @@ -30,7 +30,7 @@ async function loadLocalImage(src: string, url: URL) { if (!isAbsolute(filePath) || !filePath.startsWith(assetsDirPath)) { return undefined; } - } catch{ + } catch { return undefined; } } diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts index 56cf8d6121..5b22adecd3 100644 --- a/packages/astro/src/runtime/server/render/component.ts +++ b/packages/astro/src/runtime/server/render/component.ts @@ -179,9 +179,7 @@ async function renderFrameworkComponent( // Attempt: can we guess the renderer from the export extension? if (!renderer) { const extname = metadata.componentUrl?.split('.').pop(); - renderer = renderers.find( - ({ name }) => name === `@astrojs/${extname}` || name === extname - ); + renderer = renderers.find(({ name }) => name === `@astrojs/${extname}` || name === extname); } } diff --git a/packages/astro/src/transitions/router.ts b/packages/astro/src/transitions/router.ts index 8f849f6aae..e033b202f8 100644 --- a/packages/astro/src/transitions/router.ts +++ b/packages/astro/src/transitions/router.ts @@ -290,7 +290,7 @@ async function updateDOM( ) { try { await animate('old'); - } catch { + } catch { // animate might reject as a consequence of a call to skipTransition() // ignored on purpose } diff --git a/packages/astro/src/vite-plugin-load-fallback/index.ts b/packages/astro/src/vite-plugin-load-fallback/index.ts index 8b7f42bcc2..199f15c432 100644 --- a/packages/astro/src/vite-plugin-load-fallback/index.ts +++ b/packages/astro/src/vite-plugin-load-fallback/index.ts @@ -27,7 +27,7 @@ export default function loadFallbackPlugin({ try { // await is necessary for the catch return await fs.promises.readFile(cleanUrl(id), 'utf-8'); - } catch{ + } catch { try { return await fs.promises.readFile(id, 'utf-8'); } catch {