From 67b4d0a4df08795efc0ddab401fd931cb1770366 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Wed, 9 Jul 2025 16:23:46 -0700 Subject: [PATCH 1/2] chore(repo): Add prettier plugin for .astro files --- .prettierrc | 2 +- .../astro-hybrid/src/layouts/Layout.astro | 25 +++- .../astro-hybrid/src/pages/index.astro | 29 +++-- .../astro-hybrid/src/pages/only-admins.astro | 14 +-- .../astro-hybrid/src/pages/only-members.astro | 17 +-- .../astro-hybrid/src/pages/ssr.astro | 29 +++-- .../astro-node/src/components/Card.astro | 102 ++++++++-------- .../src/components/CustomUserButton.astro | 54 +++++---- .../src/components/StreamUser.astro | 8 +- .../astro-node/src/layouts/Layout.astro | 87 ++++++++------ .../astro-node/src/layouts/Streaming.astro | 2 +- .../src/layouts/ViewTransitionsLayout.astro | 25 +++- .../astro-node/src/layouts/react/Layout.astro | 90 ++++++++------ .../astro-node/src/pages/buttons.astro | 16 ++- .../custom-pages/organization-profile.astro | 75 +++++++----- .../src/pages/custom-pages/user-profile.astro | 38 +++--- .../astro-node/src/pages/discover.astro | 14 +-- .../astro-node/src/pages/index.astro | 70 +++++------ .../astro-node/src/pages/only-admins.astro | 21 ++-- .../astro-node/src/pages/only-members.astro | 21 ++-- .../astro-node/src/pages/organization.astro | 21 ++-- .../astro-node/src/pages/react/index.astro | 75 ++++++------ .../src/pages/react/only-admins.astro | 24 ++-- .../src/pages/react/only-members.astro | 24 ++-- .../astro-node/src/pages/react/sign-in.astro | 8 +- .../astro-node/src/pages/react/user.astro | 10 +- .../astro-node/src/pages/server-islands.astro | 26 ++-- .../astro-node/src/pages/sign-in.astro | 8 +- .../src/pages/transitions/index.astro | 12 +- .../src/pages/transitions/sign-in.astro | 10 +- .../templates/astro-node/src/pages/user.astro | 10 +- .../astro-node/src/pages/utility.astro | 16 +-- package.json | 1 + .../AuthenticateWithRedirectCallback.astro | 2 +- .../astro-components/control/Protect.astro | 24 ++-- .../astro-components/control/ProtectCSR.astro | 72 +++++++----- .../astro-components/control/ProtectSSR.astro | 12 +- .../astro-components/control/SignedIn.astro | 8 +- .../control/SignedInCSR.astro | 29 +++-- .../control/SignedInSSR.astro | 4 +- .../astro-components/control/SignedOut.astro | 8 +- .../control/SignedOutCSR.astro | 29 +++-- .../control/SignedOutSSR.astro | 4 +- .../interactive/CreateOrganization.astro | 11 +- .../CustomProfilePageRenderer.astro | 98 ++++++++-------- .../interactive/GoogleOneTap.astro | 11 +- .../InternalUIComponentRenderer.astro | 2 +- .../interactive/OrganizationList.astro | 11 +- .../OrganizationProfile.astro | 11 +- .../OrganizationProfileLink.astro | 20 +++- .../OrganizationProfilePage.astro | 30 +++-- .../interactive/OrganizationSwitcher.astro | 11 +- .../OrganizationProfileLink.astro | 20 +++- .../OrganizationProfilePage.astro | 30 +++-- .../OrganizationSwitcher.astro | 13 +- .../interactive/PricingTable.astro | 11 +- .../astro-components/interactive/SignIn.astro | 11 +- .../astro-components/interactive/SignUp.astro | 11 +- .../UserButton/MenuItemRenderer.astro | 111 +++++++++--------- .../interactive/UserButton/UserButton.astro | 11 +- .../UserButton/UserButtonAction.astro | 28 +++-- .../UserButton/UserButtonLink.astro | 19 ++- .../UserButton/UserButtonMenuItems.astro | 22 ++-- .../UserButtonUserProfilePage.astro | 79 +++++++------ .../interactive/UserProfile/UserProfile.astro | 11 +- .../UserProfile/UserProfileLink.astro | 20 +++- .../UserProfile/UserProfilePage.astro | 30 +++-- .../interactive/Waitlist.astro | 11 +- .../unstyled/SignInButton.astro | 27 +++-- .../unstyled/SignOutButton.astro | 37 +++--- .../unstyled/SignUpButton.astro | 31 ++--- pnpm-lock.yaml | 38 +++++- 72 files changed, 1105 insertions(+), 847 deletions(-) diff --git a/.prettierrc b/.prettierrc index bcb1ab38eda..b49961d93e7 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,7 +2,7 @@ "arrowParens": "avoid", "bracketSpacing": true, "jsxSingleQuote": true, - "plugins": ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss"], + "plugins": ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss", "prettier-plugin-astro"], "printWidth": 120, "semi": true, "singleAttributePerLine": true, diff --git a/integration/templates/astro-hybrid/src/layouts/Layout.astro b/integration/templates/astro-hybrid/src/layouts/Layout.astro index b5c6c9717ba..e1fad35cd47 100644 --- a/integration/templates/astro-hybrid/src/layouts/Layout.astro +++ b/integration/templates/astro-hybrid/src/layouts/Layout.astro @@ -7,13 +7,26 @@ const { title } = Astro.props; --- - + - - - - - + + + + + {title} diff --git a/integration/templates/astro-hybrid/src/pages/index.astro b/integration/templates/astro-hybrid/src/pages/index.astro index b13e67a0a46..47168af011b 100644 --- a/integration/templates/astro-hybrid/src/pages/index.astro +++ b/integration/templates/astro-hybrid/src/pages/index.astro @@ -1,19 +1,22 @@ --- -import { UserButton, SignInButton, SignedIn, SignedOut } from "@clerk/astro/components"; -import { OrganizationSwitcher } from "@clerk/astro/react"; -import Layout from "../layouts/Layout.astro"; +import { UserButton, SignInButton, SignedIn, SignedOut } from '@clerk/astro/components'; +import { OrganizationSwitcher } from '@clerk/astro/react'; +import Layout from '../layouts/Layout.astro'; export const prerender = true; --- - - -

Signed out

- -
- -

Signed in

- - -
+ + +

Signed out

+ +
+ +

Signed in

+ + +
diff --git a/integration/templates/astro-hybrid/src/pages/only-admins.astro b/integration/templates/astro-hybrid/src/pages/only-admins.astro index 842b10ac81f..9a786b993a0 100644 --- a/integration/templates/astro-hybrid/src/pages/only-admins.astro +++ b/integration/templates/astro-hybrid/src/pages/only-admins.astro @@ -1,13 +1,13 @@ --- -import { Protect } from "@clerk/astro/components"; -import Layout from "../layouts/Layout.astro"; +import { Protect } from '@clerk/astro/components'; +import Layout from '../layouts/Layout.astro'; export const prerender = true; --- - - -

I'm an admin

-

Not an admin

-
+ + +

I'm an admin

+

Not an admin

+
diff --git a/integration/templates/astro-hybrid/src/pages/only-members.astro b/integration/templates/astro-hybrid/src/pages/only-members.astro index 70eac5ff274..cf6f6b05e48 100644 --- a/integration/templates/astro-hybrid/src/pages/only-members.astro +++ b/integration/templates/astro-hybrid/src/pages/only-members.astro @@ -1,13 +1,16 @@ --- -import { Protect } from "@clerk/astro/components"; -import Layout from "../layouts/Layout.astro"; +import { Protect } from '@clerk/astro/components'; +import Layout from '../layouts/Layout.astro'; export const prerender = false; --- - - -

I'm a member

-

Not a member

-
+ + +

I'm a member

+

Not a member

+
diff --git a/integration/templates/astro-hybrid/src/pages/ssr.astro b/integration/templates/astro-hybrid/src/pages/ssr.astro index b0ad0b253ef..0db930a6145 100644 --- a/integration/templates/astro-hybrid/src/pages/ssr.astro +++ b/integration/templates/astro-hybrid/src/pages/ssr.astro @@ -1,19 +1,22 @@ --- -import { UserButton, SignInButton, SignedIn, SignedOut } from "@clerk/astro/components"; -import { OrganizationSwitcher } from "@clerk/astro/react"; -import Layout from "../layouts/Layout.astro"; +import { UserButton, SignInButton, SignedIn, SignedOut } from '@clerk/astro/components'; +import { OrganizationSwitcher } from '@clerk/astro/react'; +import Layout from '../layouts/Layout.astro'; export const prerender = false; --- - - -

Signed out

- -
- -

Signed in

- - -
+ + +

Signed out

+ +
+ +

Signed in

+ + +
diff --git a/integration/templates/astro-node/src/components/Card.astro b/integration/templates/astro-node/src/components/Card.astro index bd6d5971ebf..f223ba2f509 100644 --- a/integration/templates/astro-node/src/components/Card.astro +++ b/integration/templates/astro-node/src/components/Card.astro @@ -1,61 +1,61 @@ --- interface Props { - title: string; - body: string; - href: string; + title: string; + body: string; + href: string; } const { href, title, body } = Astro.props; --- - diff --git a/integration/templates/astro-node/src/components/CustomUserButton.astro b/integration/templates/astro-node/src/components/CustomUserButton.astro index e2d26f48a98..7586c0db5ba 100644 --- a/integration/templates/astro-node/src/components/CustomUserButton.astro +++ b/integration/templates/astro-node/src/components/CustomUserButton.astro @@ -2,25 +2,37 @@ import { UserButton } from '@clerk/astro/components'; --- - - - - - -
Icon
-
- -
Icon
-
- -
Icon
-
-
- -
Icon
-
-

Custom Terms Page

-

This is the custom terms page

-
-
+ + + + + +
Icon
+
+ +
Icon
+
+ +
Icon
+
+
+ +
Icon
+
+

Custom Terms Page

+

This is the custom terms page

+
+
diff --git a/integration/templates/astro-node/src/components/StreamUser.astro b/integration/templates/astro-node/src/components/StreamUser.astro index 4e3f562b651..deb5e7bacdc 100644 --- a/integration/templates/astro-node/src/components/StreamUser.astro +++ b/integration/templates/astro-node/src/components/StreamUser.astro @@ -1,6 +1,10 @@ --- -import { Code } from "astro:components"; +import { Code } from 'astro:components'; const user = await Astro.locals.currentUser(); --- - \ No newline at end of file + diff --git a/integration/templates/astro-node/src/layouts/Layout.astro b/integration/templates/astro-node/src/layouts/Layout.astro index 8abf4093714..3e168321da2 100644 --- a/integration/templates/astro-node/src/layouts/Layout.astro +++ b/integration/templates/astro-node/src/layouts/Layout.astro @@ -5,54 +5,70 @@ interface Props { const { title } = Astro.props; -import { SignedIn, SignedOut } from "@clerk/astro/components"; -import { LanguagePicker } from "../components/LanguagePicker"; -import CustomUserButton from "../components/CustomUserButton.astro"; +import { SignedIn, SignedOut } from '@clerk/astro/components'; +import { LanguagePicker } from '../components/LanguagePicker'; +import CustomUserButton from '../components/CustomUserButton.astro'; --- - + - - - - - + + + + + {title} -
-
-
-
- +
+
+
+ -