diff --git a/packages/astro/e2e/dev-toolbar.test.js b/packages/astro/e2e/dev-toolbar.test.js index 49472fbb3b..874a57d569 100644 --- a/packages/astro/e2e/dev-toolbar.test.js +++ b/packages/astro/e2e/dev-toolbar.test.js @@ -306,8 +306,8 @@ test.describe('Dev Toolbar', () => { await expect(customAppNotification).toHaveAttribute('data-level', 'warning'); await expect(customAppNotification).toBeVisible(); - }); - + }); + test('can quit apps by clicking outside the window', async ({ page, astro }) => { await page.goto(astro.resolveUrl('/')); diff --git a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/index.ts b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/index.ts index 1e7e3009c2..ee0d0724d1 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/index.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/index.ts @@ -1,5 +1,6 @@ import { finder } from '@medv/finder'; import type { DevToolbarApp, DevToolbarMetadata } from '../../../../../@types/astro.js'; +import { settings } from '../../settings.js'; import type { DevToolbarHighlight } from '../../ui-library/highlight.js'; import { attachTooltipToHighlight, @@ -10,7 +11,6 @@ import { import { closeOnOutsideClick, createWindowElement } from '../utils/window.js'; import { a11y } from './a11y.js'; import { perf } from './perf.js'; -import { settings } from '../../settings.js'; const icon = ''; diff --git a/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts b/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts index fa6d06ad9b..cc3c1c2215 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts @@ -1,5 +1,5 @@ -import { getIconElement, isDefinedIcon, type Icon } from './icons.js'; import { settings } from '../settings.js'; +import { type Icon, getIconElement, isDefinedIcon } from './icons.js'; const styles = ['purple', 'gray', 'red', 'green', 'yellow', 'blue'] as const; diff --git a/packages/astro/src/transitions/router.ts b/packages/astro/src/transitions/router.ts index f32a6ae287..9efb3a4577 100644 --- a/packages/astro/src/transitions/router.ts +++ b/packages/astro/src/transitions/router.ts @@ -309,7 +309,7 @@ async function updateDOM( const shouldCopyProps = (el: HTMLElement): boolean => { const persistProps = el.dataset.astroTransitionPersistProps; return persistProps == null || persistProps === 'false'; - } + }; const defaultSwap = (beforeSwapEvent: TransitionBeforeSwapEvent) => { // swap attributes of the html element @@ -375,7 +375,7 @@ async function updateDOM( // from the old page so that state is preserved. newEl.replaceWith(el); // For islands, copy over the props to allow them to re-render - if(newEl.localName === 'astro-island' && shouldCopyProps(el as HTMLElement)) { + if (newEl.localName === 'astro-island' && shouldCopyProps(el as HTMLElement)) { el.setAttribute('ssr', ''); el.setAttribute('props', newEl.getAttribute('props')!); } diff --git a/packages/integrations/react/client.js b/packages/integrations/react/client.js index cfe46a9192..76f9ead008 100644 --- a/packages/integrations/react/client.js +++ b/packages/integrations/react/client.js @@ -57,7 +57,7 @@ function getChildren(childString, experimentalReactChildren) { let rootMap = new WeakMap(); const getOrCreateRoot = (element, creator) => { let root = rootMap.get(element); - if(!root) { + if (!root) { root = creator(); rootMap.set(element, root); } diff --git a/packages/markdown/remark/src/rehype-shiki.ts b/packages/markdown/remark/src/rehype-shiki.ts index 137cb81411..dd146f110a 100644 --- a/packages/markdown/remark/src/rehype-shiki.ts +++ b/packages/markdown/remark/src/rehype-shiki.ts @@ -1,8 +1,8 @@ import type { Root } from 'hast'; import type { Plugin } from 'unified'; -import { createShikiHighlighter, type ShikiHighlighter } from './shiki.js'; -import type { ShikiConfig } from './types.js'; import { highlightCodeBlocks } from './highlight.js'; +import { type ShikiHighlighter, createShikiHighlighter } from './shiki.js'; +import type { ShikiConfig } from './types.js'; export const rehypeShiki: Plugin<[ShikiConfig?], Root> = (config) => { let highlighterAsync: Promise | undefined;