From 239563eac50230812cfe1c940ac5fbfd64d0b9be Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Fri, 19 Jan 2024 14:23:07 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20Update=20and=20fix=20prettier=20?= =?UTF-8?q?config=20(#987)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/---bug-report.md | 22 ++++++++------- .github/ISSUE_TEMPLATE/---feature-request.md | 7 ++--- .prettierrc | 1 + apps/docs/contribute/documentation.mdx | 5 +++- apps/docs/contribute/translations.mdx | 7 +++-- apps/docs/introduction.mdx | 2 +- apps/docs/self-hosting/introduction.mdx | 2 +- apps/docs/tsconfig.json | 2 +- apps/docs/workflow/finalize.mdx | 1 + .../blog/markdown-styles.module.css | 4 +-- apps/landing/src/pages/cookie-policy.tsx | 2 +- apps/landing/src/pages/privacy-policy.tsx | 2 +- apps/landing/src/pages/terms-of-use.tsx | 2 +- apps/landing/src/style.css | 4 ++- apps/landing/tsconfig.json | 6 ++-- apps/web/src/app/[locale]/(admin)/layout.tsx | 12 ++++---- .../src/app/[locale]/(admin)/menu-item.tsx | 4 +-- .../web/src/app/[locale]/(admin)/new/page.tsx | 2 +- .../src/app/[locale]/(admin)/polls/layout.tsx | 4 +-- .../app/[locale]/(admin)/polls/loading.tsx | 12 ++++---- .../[locale]/(admin)/polls/polls-folders.tsx | 2 +- .../app/[locale]/(admin)/polls/polls-list.tsx | 14 +++++----- .../[locale]/(admin)/settings/menu-item.tsx | 6 ++-- apps/web/src/app/[locale]/(admin)/sidebar.tsx | 20 ++++++------- .../src/app/[locale]/(auth)/login/loading.tsx | 2 +- .../app/[locale]/(auth)/login/login-form.tsx | 4 +-- .../src/app/[locale]/(auth)/login/page.tsx | 2 +- .../src/app/[locale]/(auth)/register/page.tsx | 2 +- .../[locale]/invite/[urlId]/invite-page.tsx | 6 ++-- .../app/[locale]/invite/[urlId]/loading.tsx | 4 +-- .../src/app/[locale]/invite/[urlId]/nav.tsx | 2 +- .../web/src/app/[locale]/menu/back-button.tsx | 2 +- apps/web/src/app/[locale]/menu/page.tsx | 2 +- .../poll/[urlId]/guest-poll-alert.tsx | 4 +-- .../src/app/[locale]/poll/[urlId]/page.tsx | 2 +- .../app/[locale]/poll/[urlId]/skeleton.tsx | 4 +-- apps/web/src/app/components/logo-link.tsx | 2 +- apps/web/src/app/components/page-layout.tsx | 8 +++--- apps/web/src/components/auth/auth-forms.tsx | 2 +- apps/web/src/components/auth/auth-layout.tsx | 2 +- apps/web/src/components/card.tsx | 2 +- apps/web/src/components/event-card.tsx | 12 ++++---- apps/web/src/components/invite-dialog.tsx | 4 +-- .../src/components/layouts/poll-layout.tsx | 6 ++-- apps/web/src/components/page-dialog.tsx | 2 +- apps/web/src/components/pay-wall.tsx | 2 +- apps/web/src/components/poll-status.tsx | 8 +++--- .../src/components/poll/poll-subheader.tsx | 2 +- apps/web/src/components/settings/settings.tsx | 4 +-- apps/web/src/components/table.tsx | 6 ++-- apps/web/src/components/text-input.tsx | 2 +- apps/web/src/components/user-dropdown.tsx | 28 +++++++++---------- apps/web/src/components/user.tsx | 4 +-- apps/web/src/style.css | 8 ++++-- apps/web/src/utils/auth.ts | 2 +- apps/web/tsconfig.json | 8 +++--- package.json | 4 ++- packages/backend/tsconfig.json | 2 +- packages/database/tsconfig.json | 2 +- packages/emails/tsconfig.json | 2 +- packages/icons/tsconfig.json | 2 +- packages/languages/tsconfig.json | 2 +- packages/ui/alert.tsx | 4 +-- packages/ui/table.tsx | 2 +- packages/ui/toast.tsx | 6 ++-- packages/ui/tsconfig.json | 6 ++-- packages/utils/tsconfig.json | 2 +- yarn.lock | 13 ++++++--- 68 files changed, 181 insertions(+), 161 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/---bug-report.md b/.github/ISSUE_TEMPLATE/---bug-report.md index 255aa018c..17d8c6870 100644 --- a/.github/ISSUE_TEMPLATE/---bug-report.md +++ b/.github/ISSUE_TEMPLATE/---bug-report.md @@ -1,10 +1,9 @@ --- name: "\U0001F41E Bug report" about: Create a report to help us improve -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/---feature-request.md b/.github/ISSUE_TEMPLATE/---feature-request.md index 9d89858cc..8150e01b8 100644 --- a/.github/ISSUE_TEMPLATE/---feature-request.md +++ b/.github/ISSUE_TEMPLATE/---feature-request.md @@ -1,10 +1,9 @@ --- name: "\U0001F914 Feature request" about: Please use discussions instead of issues for feature requests -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **DO NOT OPEN AN ISSUE FOR FEATURE REQUESTS** diff --git a/.prettierrc b/.prettierrc index d3432c135..43603229a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { + "plugins": ["prettier-plugin-tailwindcss"], "semi": true, "tabWidth": 2, "useTabs": false, diff --git a/apps/docs/contribute/documentation.mdx b/apps/docs/contribute/documentation.mdx index 7c56892cd..f681cd9d2 100644 --- a/apps/docs/contribute/documentation.mdx +++ b/apps/docs/contribute/documentation.mdx @@ -7,7 +7,10 @@ description: Help us maintain and improve our documentation If you have a [Github](https://github.com) account, you can make changes or report issues using the links that appear at the top of each page. - Edit Documentation Links + Edit Documentation Links ## Submitting a Pull Request diff --git a/apps/docs/contribute/translations.mdx b/apps/docs/contribute/translations.mdx index c75180012..ff92c2c6f 100644 --- a/apps/docs/contribute/translations.mdx +++ b/apps/docs/contribute/translations.mdx @@ -20,7 +20,7 @@ Once you've joined the project: 3. Start translating! - Crowdin Project + Crowdin Project ## Tips for Translators @@ -98,7 +98,10 @@ If your language requires more than one plural form, you can add additional rule ``` - Using ICU Message Format on Corwdin + Using ICU Message Format on Corwdin ### Register diff --git a/apps/docs/introduction.mdx b/apps/docs/introduction.mdx index e473efe1e..0effb3b04 100644 --- a/apps/docs/introduction.mdx +++ b/apps/docs/introduction.mdx @@ -5,7 +5,7 @@ description: "Welcome to the official documentation for Rallly." --- - Rallly Splash Image + Rallly Splash Image ## What is Rallly? diff --git a/apps/docs/self-hosting/introduction.mdx b/apps/docs/self-hosting/introduction.mdx index dfe388ab9..87b636955 100644 --- a/apps/docs/self-hosting/introduction.mdx +++ b/apps/docs/self-hosting/introduction.mdx @@ -8,7 +8,7 @@ Rallly is 100% open-source and available under the [GNU Affero General Public Li which allows you to run your own instance of Rallly for free for both personal and commercial use. - Rallly Splash Image + Rallly Splash Image ## Official Docker Image diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index 4ad2dd442..beac8603e 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@rallly/tsconfig/next.json", "include": ["**/*.ts", "**/*.tsx", "**/*.js"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], } diff --git a/apps/docs/workflow/finalize.mdx b/apps/docs/workflow/finalize.mdx index 0c7a923c2..2ff00e4c7 100644 --- a/apps/docs/workflow/finalize.mdx +++ b/apps/docs/workflow/finalize.mdx @@ -27,5 +27,6 @@ description: "Pick a final date for your event" Finalized Poll + diff --git a/apps/landing/src/components/blog/markdown-styles.module.css b/apps/landing/src/components/blog/markdown-styles.module.css index 73d2a930c..f9e9b2f60 100644 --- a/apps/landing/src/components/blog/markdown-styles.module.css +++ b/apps/landing/src/components/blog/markdown-styles.module.css @@ -10,11 +10,11 @@ } .markdown h2 { - @apply mt-12 mb-4 text-2xl font-semibold leading-snug; + @apply mb-4 mt-12 text-2xl font-semibold leading-snug; } .markdown h3 { - @apply mt-8 mb-4 text-xl font-semibold leading-snug; + @apply mb-4 mt-8 text-xl font-semibold leading-snug; } .markdown a { diff --git a/apps/landing/src/pages/cookie-policy.tsx b/apps/landing/src/pages/cookie-policy.tsx index 5510fcaf9..389ecbdca 100644 --- a/apps/landing/src/pages/cookie-policy.tsx +++ b/apps/landing/src/pages/cookie-policy.tsx @@ -8,7 +8,7 @@ const PrivacyPolicy = () => { return ( -
+

Cookie Policy

Last updated: 19 April 2023

diff --git a/apps/landing/src/pages/privacy-policy.tsx b/apps/landing/src/pages/privacy-policy.tsx index b175d54f1..0c5128fb5 100644 --- a/apps/landing/src/pages/privacy-policy.tsx +++ b/apps/landing/src/pages/privacy-policy.tsx @@ -7,7 +7,7 @@ const PrivacyPolicy = () => { return ( -

+

Privacy Policy

Last updated: 1 August 2023

diff --git a/apps/landing/src/pages/terms-of-use.tsx b/apps/landing/src/pages/terms-of-use.tsx index 2de4d7b0e..970870e7f 100644 --- a/apps/landing/src/pages/terms-of-use.tsx +++ b/apps/landing/src/pages/terms-of-use.tsx @@ -7,7 +7,7 @@ const PrivacyPolicy = () => { return ( -

+

Terms of Use

Last updated: 4 July 2023

diff --git a/apps/landing/src/style.css b/apps/landing/src/style.css index 7f5036d79..7dc5cf884 100644 --- a/apps/landing/src/style.css +++ b/apps/landing/src/style.css @@ -8,7 +8,9 @@ } body { @apply text-foreground overflow-y-auto bg-gray-200/50; - font-feature-settings: "rlig" 1, "calt" 1; + font-feature-settings: + "rlig" 1, + "calt" 1; } html { @apply h-full font-sans text-base; diff --git a/apps/landing/tsconfig.json b/apps/landing/tsconfig.json index e259cb9d5..00fe2e1a7 100644 --- a/apps/landing/tsconfig.json +++ b/apps/landing/tsconfig.json @@ -4,10 +4,10 @@ "baseUrl": ".", "paths": { "@/*": ["src/*"], - "~/*": ["public/*"] + "~/*": ["public/*"], }, - "checkJs": false + "checkJs": false, }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], } diff --git a/apps/web/src/app/[locale]/(admin)/layout.tsx b/apps/web/src/app/[locale]/(admin)/layout.tsx index ba5f94bd1..ecf190aa7 100644 --- a/apps/web/src/app/[locale]/(admin)/layout.tsx +++ b/apps/web/src/app/[locale]/(admin)/layout.tsx @@ -29,18 +29,18 @@ const Auth = ({ children }: { children: React.ReactNode }) => { function MobileNavigation() { return ( -

+
-
+
@@ -59,7 +59,7 @@ export default async function Layout({ -
+
{children}
diff --git a/apps/web/src/app/[locale]/(admin)/menu-item.tsx b/apps/web/src/app/[locale]/(admin)/menu-item.tsx index 9235b17ad..6fc4ac9c1 100644 --- a/apps/web/src/app/[locale]/(admin)/menu-item.tsx +++ b/apps/web/src/app/[locale]/(admin)/menu-item.tsx @@ -23,8 +23,8 @@ export function MenuItem({ className={cn( isCurrent ? "bg-gray-200 text-indigo-600" - : "text-gray-700 hover:text-primary", - "group flex items-center gap-x-3 rounded-md py-2 px-3 text-sm leading-6 font-semibold", + : "hover:text-primary text-gray-700", + "group flex items-center gap-x-3 rounded-md px-3 py-2 text-sm font-semibold leading-6", )} > -
+
diff --git a/apps/web/src/app/[locale]/(admin)/polls/layout.tsx b/apps/web/src/app/[locale]/(admin)/polls/layout.tsx index 234a9dfa4..680e08485 100644 --- a/apps/web/src/app/[locale]/(admin)/polls/layout.tsx +++ b/apps/web/src/app/[locale]/(admin)/polls/layout.tsx @@ -22,13 +22,13 @@ export default async function Layout({ return ( -
+
diff --git a/apps/web/src/app/[locale]/(auth)/login/loading.tsx b/apps/web/src/app/[locale]/(auth)/login/loading.tsx index f96791430..c83e66c9c 100644 --- a/apps/web/src/app/[locale]/(auth)/login/loading.tsx +++ b/apps/web/src/app/[locale]/(auth)/login/loading.tsx @@ -2,7 +2,7 @@ import { Spinner } from "@/components/spinner"; export default function Loading() { return ( -
+
); diff --git a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx index b239031e6..b17de8ba9 100644 --- a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx +++ b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx @@ -129,12 +129,12 @@ export function LoginForm({ oidcConfig }: { oidcConfig?: { name: string } }) { {hasAlternativeLoginMethods ? ( <> -
+
diff --git a/apps/web/src/app/[locale]/(auth)/login/page.tsx b/apps/web/src/app/[locale]/(auth)/login/page.tsx index 84874ee1a..128abbbbd 100644 --- a/apps/web/src/app/[locale]/(auth)/login/page.tsx +++ b/apps/web/src/app/[locale]/(auth)/login/page.tsx @@ -20,7 +20,7 @@ export default async function LoginPage({ params }: { params: Params }) { oidcConfig={isOIDCEnabled ? { name: oidcName } : undefined} /> -
+
-
+
{ className={poll.userId !== user.id ? "hidden" : ""} > - + @@ -92,8 +92,8 @@ export function InvitePage() { -
-
+
+
diff --git a/apps/web/src/app/[locale]/invite/[urlId]/loading.tsx b/apps/web/src/app/[locale]/invite/[urlId]/loading.tsx index bd4ea3dd0..9b0ec733f 100644 --- a/apps/web/src/app/[locale]/invite/[urlId]/loading.tsx +++ b/apps/web/src/app/[locale]/invite/[urlId]/loading.tsx @@ -4,8 +4,8 @@ import { Skeleton } from "@/components/skeleton"; export default function Loading() { return ( - - + + ); diff --git a/apps/web/src/app/[locale]/invite/[urlId]/nav.tsx b/apps/web/src/app/[locale]/invite/[urlId]/nav.tsx index fa19af8cd..7f4c8e7c1 100644 --- a/apps/web/src/app/[locale]/invite/[urlId]/nav.tsx +++ b/apps/web/src/app/[locale]/invite/[urlId]/nav.tsx @@ -23,7 +23,7 @@ export const Nav = () => { className={poll.userId !== user.id ? "hidden" : ""} > - + diff --git a/apps/web/src/app/[locale]/menu/back-button.tsx b/apps/web/src/app/[locale]/menu/back-button.tsx index b6f91669a..046fbdf4b 100644 --- a/apps/web/src/app/[locale]/menu/back-button.tsx +++ b/apps/web/src/app/[locale]/menu/back-button.tsx @@ -13,7 +13,7 @@ export function BackButton() { router.back(); }} > - + ); } diff --git a/apps/web/src/app/[locale]/menu/page.tsx b/apps/web/src/app/[locale]/menu/page.tsx index a537bf5fa..570f9261c 100644 --- a/apps/web/src/app/[locale]/menu/page.tsx +++ b/apps/web/src/app/[locale]/menu/page.tsx @@ -9,7 +9,7 @@ export default function Page() {
{ defaults="<0>Create an account or <1>login to claim this poll." components={[ , - , + , ]} /> diff --git a/apps/web/src/app/[locale]/poll/[urlId]/page.tsx b/apps/web/src/app/[locale]/poll/[urlId]/page.tsx index 3e95058dc..a6404bebd 100644 --- a/apps/web/src/app/[locale]/poll/[urlId]/page.tsx +++ b/apps/web/src/app/[locale]/poll/[urlId]/page.tsx @@ -6,7 +6,7 @@ import { GuestPollAlert } from "./guest-poll-alert"; export default async function Page() { return ( -
+
diff --git a/apps/web/src/app/[locale]/poll/[urlId]/skeleton.tsx b/apps/web/src/app/[locale]/poll/[urlId]/skeleton.tsx index bd31d4518..d2ad545cd 100644 --- a/apps/web/src/app/[locale]/poll/[urlId]/skeleton.tsx +++ b/apps/web/src/app/[locale]/poll/[urlId]/skeleton.tsx @@ -5,8 +5,8 @@ export default function Loading() { return ( - - + + ); diff --git a/apps/web/src/app/components/logo-link.tsx b/apps/web/src/app/components/logo-link.tsx index bbf374a5e..cfe3bfaf8 100644 --- a/apps/web/src/app/components/logo-link.tsx +++ b/apps/web/src/app/components/logo-link.tsx @@ -4,7 +4,7 @@ import Link from "next/link"; export function LogoLink() { return ( +

{children}

); @@ -34,9 +34,9 @@ export function PageHeader({ return (
{children}
; + return
{children}
; } diff --git a/apps/web/src/components/auth/auth-forms.tsx b/apps/web/src/components/auth/auth-forms.tsx index 2a3f29835..16b396db3 100644 --- a/apps/web/src/components/auth/auth-forms.tsx +++ b/apps/web/src/components/auth/auth-forms.tsx @@ -44,7 +44,7 @@ export const VerifyCode: React.FunctionComponent<{ })} >
-

{t("verifyYourEmail")}

+

{t("verifyYourEmail")}

{t("stepSummary", { current: 2, diff --git a/apps/web/src/components/auth/auth-layout.tsx b/apps/web/src/components/auth/auth-layout.tsx index 17c9d44e8..6922ab45e 100644 --- a/apps/web/src/components/auth/auth-layout.tsx +++ b/apps/web/src/components/auth/auth-layout.tsx @@ -15,7 +15,7 @@ export const AuthCard = ({ children }: { children?: React.ReactNode }) => { export const AuthFooter = ({ children }: { children?: React.ReactNode }) => { return ( -
+
{children}
); diff --git a/apps/web/src/components/card.tsx b/apps/web/src/components/card.tsx index f4c95d5e3..54fa93057 100644 --- a/apps/web/src/components/card.tsx +++ b/apps/web/src/components/card.tsx @@ -11,7 +11,7 @@ export const Card = ( className={cn( "max-w-full overflow-hidden bg-white shadow-sm", props.fullWidthOnMobile - ? "sm:rounded-md sm:border-y sm:border-x" + ? "sm:rounded-md sm:border-x sm:border-y" : "rounded-md border shadow-sm", props.className, )} diff --git a/apps/web/src/components/event-card.tsx b/apps/web/src/components/event-card.tsx index 7bc8a3870..724adcd04 100644 --- a/apps/web/src/components/event-card.tsx +++ b/apps/web/src/components/event-card.tsx @@ -41,10 +41,10 @@ export const EventCard = () => { return (
-
+
{poll.event ? ( @@ -56,7 +56,7 @@ export const EventCard = () => { ) : null}

{preventWidows(poll.title)} @@ -105,7 +105,7 @@ export const EventCard = () => {
{poll.description ? (
- +
{poll.description}
@@ -113,12 +113,12 @@ export const EventCard = () => { ) : null} {poll.location ? (
- + {poll.location}
) : null}
- +
diff --git a/apps/web/src/components/invite-dialog.tsx b/apps/web/src/components/invite-dialog.tsx index 712160ecb..2ffb703d3 100644 --- a/apps/web/src/components/invite-dialog.tsx +++ b/apps/web/src/components/invite-dialog.tsx @@ -29,7 +29,7 @@ export function CopyInviteLinkButton() { return ( ); diff --git a/apps/web/src/components/layouts/poll-layout.tsx b/apps/web/src/components/layouts/poll-layout.tsx index 850dde21a..6f1336eb0 100644 --- a/apps/web/src/components/layouts/poll-layout.tsx +++ b/apps/web/src/components/layouts/poll-layout.tsx @@ -167,9 +167,9 @@ const Layout = ({ children }: React.PropsWithChildren) => { return ( - -
-
+ +
+
{pathname === pollLink ? (