diff options
Diffstat (limited to 'packages/integrations/react')
-rw-r--r-- | packages/integrations/react/CHANGELOG.md | 2 | ||||
-rw-r--r-- | packages/integrations/react/client-v17.js | 2 | ||||
-rw-r--r-- | packages/integrations/react/client.js | 4 | ||||
-rw-r--r-- | packages/integrations/react/server.js | 2 | ||||
-rw-r--r-- | packages/integrations/react/src/actions.ts | 4 | ||||
-rw-r--r-- | packages/integrations/react/src/index.ts | 4 | ||||
-rw-r--r-- | packages/integrations/react/test/react-component.test.js | 6 |
7 files changed, 12 insertions, 12 deletions
diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index b8aa870f5..5a3fdbcbc 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -154,7 +154,7 @@ export function Like({ postId }: { postId: string }) { const [state, action, pending] = useActionState( experimental_withState(actions.like), - 0 // initial likes + 0, // initial likes ); return ( diff --git a/packages/integrations/react/client-v17.js b/packages/integrations/react/client-v17.js index 565c688d4..bd17050ea 100644 --- a/packages/integrations/react/client-v17.js +++ b/packages/integrations/react/client-v17.js @@ -10,7 +10,7 @@ export default (element) => const componentEl = createElement( Component, props, - children != null ? createElement(StaticHtml, { value: children }) : children + children != null ? createElement(StaticHtml, { value: children }) : children, ); const isHydrate = client !== 'only'; diff --git a/packages/integrations/react/client.js b/packages/integrations/react/client.js index 13515df40..044eaf26f 100644 --- a/packages/integrations/react/client.js +++ b/packages/integrations/react/client.js @@ -33,7 +33,7 @@ function createReactElementFromDOMElement(element) { return undefined; } }) - .filter((a) => !!a) + .filter((a) => !!a), ); } @@ -88,7 +88,7 @@ export default (element) => const componentEl = createElement( Component, props, - getChildren(children, element.hasAttribute('data-react-children')) + getChildren(children, element.hasAttribute('data-react-children')), ); const rootKey = isAlreadyHydrated(element); // HACK: delete internal react marker for nested components to suppress aggressive warnings diff --git a/packages/integrations/react/server.js b/packages/integrations/react/server.js index 16bf6785e..3907ba6f1 100644 --- a/packages/integrations/react/server.js +++ b/packages/integrations/react/server.js @@ -174,7 +174,7 @@ async function renderToPipeableStreamAsync(vnode, options) { destroy() { resolve(html); }, - }) + }), ); }, }); diff --git a/packages/integrations/react/src/actions.ts b/packages/integrations/react/src/actions.ts index bc45e28ee..a5ccb2f9a 100644 --- a/packages/integrations/react/src/actions.ts +++ b/packages/integrations/react/src/actions.ts @@ -51,7 +51,7 @@ export async function experimental_getActionState<T>({ if (!contentType || !isFormRequest(contentType)) { throw new AstroError( '`getActionState()` must be called with a form request.', - "Ensure your action uses the `accept: 'form'` option." + "Ensure your action uses the `accept: 'form'` option.", ); } const formData = await request.clone().formData(); @@ -59,7 +59,7 @@ export async function experimental_getActionState<T>({ if (!state) { throw new AstroError( '`getActionState()` could not find a state object.', - 'Ensure your action was passed to `useActionState()` with the `experimental_withState()` wrapper.' + 'Ensure your action was passed to `useActionState()` with the `experimental_withState()` wrapper.', ); } return JSON.parse(state) as T; diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index f8a9c4ab2..49cb0e6f7 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -50,7 +50,7 @@ function optionsPlugin(experimentalReactChildren: boolean): vite.Plugin { function getViteConfiguration( { include, exclude, babel, experimentalReactChildren }: ReactIntegrationOptions = {}, - reactConfig: ReactVersionConfig + reactConfig: ReactVersionConfig, ) { return { optimizeDeps: { @@ -101,7 +101,7 @@ export default function ({ updateConfig({ vite: getViteConfiguration( { include, exclude, babel, experimentalReactChildren }, - versionConfig + versionConfig, ), }); if (command === 'dev') { diff --git a/packages/integrations/react/test/react-component.test.js b/packages/integrations/react/test/react-component.test.js index 44dbb138f..25a35f49d 100644 --- a/packages/integrations/react/test/react-component.test.js +++ b/packages/integrations/react/test/react-component.test.js @@ -54,7 +54,7 @@ describe('React Components', () => { assert.equal(islandsWithChildren.length, 2); assert.equal( $(islandsWithChildren[0]).html(), - $(islandsWithChildren[1]).find('astro-slot').html() + $(islandsWithChildren[1]).find('astro-slot').html(), ); // test 11: Should generate unique React.useId per island @@ -150,8 +150,8 @@ describe('React Components', () => { `[/window] The window object is not available during server-side rendering (SSR). Try using \`import.meta.env.SSR\` to write SSR-friendly code. - https://docs.astro.build/reference/api-reference/#importmeta` - ) + https://docs.astro.build/reference/api-reference/#importmeta`, + ), ); }); |