diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..81038918 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Bulk reformats. `git config blame.ignoreRevsFile .git-blame-ignore-revs` +6e3cbb357b6cccf73052848bcae815bcb9c057d7 # prettier, 759 files diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 29dcf889..f814320c 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -19,10 +19,10 @@ name: Auto-merge on: workflow_run: - workflows: ['CI'] + workflows: ["CI"] types: [completed] schedule: - - cron: '*/10 * * * *' + - cron: "*/10 * * * *" workflow_dispatch: {} # Declared on the CALLER as well as inside the reusable workflow: a called @@ -46,4 +46,4 @@ jobs: # SPACE-separated: the sweep word-splits this. A comma would become one # bogus token, every dispatch would fail, and the only symptom would be # that nothing deploys — while the sweep still reported success. - rearm_workflows: 'ci.yml deploy.yml' + rearm_workflows: "ci.yml deploy.yml" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d317155f..d47f2f13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,17 +5,17 @@ on: push: branches: [main] paths-ignore: - - '**.md' - - 'docs/**' - - 'LICENSE' - - '.vscode/**' + - "**.md" + - "docs/**" + - "LICENSE" + - ".vscode/**" pull_request: branches: [main] paths-ignore: - - '**.md' - - 'docs/**' - - 'LICENSE' - - '.vscode/**' + - "**.md" + - "docs/**" + - "LICENSE" + - ".vscode/**" # Cancel in-progress runs on new pushes to the same PR concurrency: @@ -23,8 +23,8 @@ concurrency: cancel-in-progress: true env: - NODE_VERSION: '20' - PNPM_VERSION: '9' + NODE_VERSION: "20" + PNPM_VERSION: "9" jobs: ci: @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..1ed5ea51 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,21 @@ +# Build output and vendored trees — formatting these is noise. +node_modules +.next +dist +build +out +coverage +.turbo +.vercel +*.min.js +*.min.css + +# Lockfiles are generated; prettier would rewrite them wholesale. +package-lock.json +pnpm-lock.yaml +yarn.lock + +# Markdown is deliberately out of scope for now. Prettier rewraps prose, which +# is where it is most opinionated and least useful, and it would bury the real +# diff. Remove this line when you want docs formatted too. +*.md diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..a2f11f06 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "printWidth": 100, + "tabWidth": 2, + "trailingComma": "all", + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/apps/web/app/(auth)/error.tsx b/apps/web/app/(auth)/error.tsx index 1c620004..07fdb4bb 100644 --- a/apps/web/app/(auth)/error.tsx +++ b/apps/web/app/(auth)/error.tsx @@ -25,9 +25,7 @@ export default function AuthError({

{t("errorTitle")}

-

- {t("errorDescription")} -

+

{t("errorDescription")}

-

- {t("checkYourEmail")} -

-

- {t("resetEmailSent")} -

+

{t("checkYourEmail")}

+

{t("resetEmailSent")}

) : ( <> -

- {t("resetPassword")} -

-

- {t("resetPasswordSubtitle")} -

+

{t("resetPassword")}

+

{t("resetPasswordSubtitle")}

{error && (
- +
-
{error && ( -
- {error} -
+
{error}
)}
-
-
-
diff --git a/apps/web/app/(auth)/invite/[token]/page.tsx b/apps/web/app/(auth)/invite/[token]/page.tsx index 98c76b3f..df2e9556 100644 --- a/apps/web/app/(auth)/invite/[token]/page.tsx +++ b/apps/web/app/(auth)/invite/[token]/page.tsx @@ -6,10 +6,7 @@ import { useRouter } from "next/navigation"; import Link from "next/link"; import { Loader2, Building2, CheckCircle2, XCircle, Clock } from "lucide-react"; import { useTranslations } from "next-intl"; -import { - getInvitationDetailsAction, - acceptInvitationAction, -} from "@/app/actions/invitations"; +import { getInvitationDetailsAction, acceptInvitationAction } from "@/app/actions/invitations"; import { registerAndAcceptInviteAction } from "@/app/actions/auth"; import type { InvitationWithCompany } from "@kivvi/core/src/domain/invitations"; import { InviteRegisterForm } from "./invite-register-form"; @@ -20,18 +17,12 @@ interface InvitePageProps { export default function InvitePage({ params }: InvitePageProps) { const { token } = params; - const { - data: session, - status: sessionStatus, - update: updateSession, - } = useSession(); + const { data: session, status: sessionStatus, update: updateSession } = useSession(); const router = useRouter(); const t = useTranslations("team"); const tc = useTranslations("common"); - const [invitation, setInvitation] = useState( - null, - ); + const [invitation, setInvitation] = useState(null); const [loading, setLoading] = useState(true); const [accepting, setAccepting] = useState(false); const [error, setError] = useState(""); @@ -221,17 +212,13 @@ export default function InvitePage({ params }: InvitePageProps) {

{t("roleAssignment", { - role: invitation - ? tc(`permissionPresetLabel.${invitation.permissionPreset}`) - : "", + role: invitation ? tc(`permissionPresetLabel.${invitation.permissionPreset}`) : "", })}

{error && ( -
- {error} -
+
{error}
)} @@ -98,26 +81,16 @@ export function JoinHome({
{user.avatarBase64 ? ( // eslint-disable-next-line @next/next/no-img-element - + ) : ( )}

{title}

-

- {description} -

-

- {user.name || user.email} -

-

- {user.email} -

+

{description}

+

{user.name || user.email}

+

{user.email}

@@ -127,9 +100,7 @@ export function JoinHome({

{t("profileTitle")}

-

- {t("profileDesc")} -

+

{t("profileDesc")}

{t("pendingInvites")} {pendingInvites.length === 0 ? ( -

- {t("waitingDesc")} -

+

{t("waitingDesc")}

) : (
{pendingInvites.map((invite) => ( @@ -204,14 +173,9 @@ export function JoinHome({

- +
))} @@ -224,9 +188,7 @@ export function JoinHome({

{t("discoveryTitle")}

-

- {t("discoveryDesc")} -

+

{t("discoveryDesc")}

diff --git a/apps/web/app/(auth)/login/page.tsx b/apps/web/app/(auth)/login/page.tsx index eae5a5ef..182581b4 100644 --- a/apps/web/app/(auth)/login/page.tsx +++ b/apps/web/app/(auth)/login/page.tsx @@ -71,11 +71,7 @@ function LoginForm() { {error && (
- +
- - + {t("forgotPassword")}
@@ -133,24 +123,14 @@ function LoginForm() { onClick={() => setShowPassword(!showPassword)} className="absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground" tabIndex={-1} - aria-label={ - showPassword ? t("hidePassword") : t("showPassword") - } + aria-label={showPassword ? t("hidePassword") : t("showPassword")} > - {showPassword ? ( - - ) : ( - - )} + {showPassword ? : }
- @@ -158,10 +138,7 @@ function LoginForm() {
{t("noAccount")}{" "} - + {t("createAccount")}
@@ -186,9 +163,7 @@ function LoginForm() { {/* Right side - Brand & Features */}
-

- {t("businessOnAutopilot")} -

+

{t("businessOnAutopilot")}

{t("heroSubtitle")}

    diff --git a/apps/web/app/(auth)/register/register-features-panel.tsx b/apps/web/app/(auth)/register/register-features-panel.tsx index 96b5b72a..e09f602b 100644 --- a/apps/web/app/(auth)/register/register-features-panel.tsx +++ b/apps/web/app/(auth)/register/register-features-panel.tsx @@ -19,9 +19,7 @@ export function RegisterFeaturesPanel() { return (
    -

    - {t("businessOnAutopilot")} -

    +

    {t("businessOnAutopilot")}

    {t("heroSubtitle")}

      diff --git a/apps/web/app/(auth)/register/register-form.tsx b/apps/web/app/(auth)/register/register-form.tsx index cc73f7a4..f203ec90 100644 --- a/apps/web/app/(auth)/register/register-form.tsx +++ b/apps/web/app/(auth)/register/register-form.tsx @@ -130,11 +130,7 @@ export function RegisterForm({ prefillEmail, callbackUrl }: RegisterFormProps) { {error && (
      - + -

      - {t("companyNameHint")} -

      +

      {t("companyNameHint")}

      )}
    @@ -207,10 +198,7 @@ export function RegisterForm({ prefillEmail, callbackUrl }: RegisterFormProps) {
    -
-

- {t("passwordResetSuccess")} -

-

- {t("passwordResetSuccessMessage")} -

+

{t("passwordResetSuccess")}

+

{t("passwordResetSuccessMessage")}

) : ( <> -

- {t("resetYourPassword")} -

-

- {t("enterNewPassword")} -

+

{t("resetYourPassword")}

+

{t("enterNewPassword")}

{error && (
- +
-
-