diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..1c8de4a --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Bulk reformats. `git config blame.ignoreRevsFile .git-blame-ignore-revs` +b13c7d4ef9f9dd3a3014901c05406046c691deec # prettier, 20 files diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a646416..554fa37 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,7 +11,7 @@ version: 2 updates: - package-ecosystem: npm - directory: "/" + directory: '/' schedule: interval: weekly open-pull-requests-limit: 5 @@ -20,7 +20,7 @@ updates: update-types: [minor, patch] - package-ecosystem: github-actions - directory: "/" + directory: '/' schedule: interval: weekly open-pull-requests-limit: 3 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1ed5ea5 --- /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 0000000..616247a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": true, + "printWidth": 100, + "tabWidth": 2, + "trailingComma": "all", + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/app/api/enquiry/route.ts b/app/api/enquiry/route.ts index 4b01245..d409d5e 100644 --- a/app/api/enquiry/route.ts +++ b/app/api/enquiry/route.ts @@ -120,12 +120,7 @@ export async function POST(request: NextRequest) { // Log the whole enquiry, not just the failure. The send is the only copy in // flight, so without this a bad API key silently costs him the booking — // journald keeps it until someone can forward it by hand. - console.error( - '[enquiry] send failed:', - result.reason, - '\n', - formatEnquiry(values, locale), - ); + console.error('[enquiry] send failed:', result.reason, '\n', formatEnquiry(values, locale)); return NextResponse.json({ ok: false, error: 'sendFailed' }, { status: 502 }); } diff --git a/app/sitemap.ts b/app/sitemap.ts index 6012abf..2d9f315 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -11,9 +11,7 @@ import { SITE } from '@/lib/site'; * be indexed. */ export default function sitemap(): MetadataRoute.Sitemap { - const languages = Object.fromEntries( - LOCALES.map((l) => [HTML_LANG[l], `${SITE.url}/${l}`]), - ); + const languages = Object.fromEntries(LOCALES.map((l) => [HTML_LANG[l], `${SITE.url}/${l}`])); return LOCALES.map((locale) => ({ url: `${SITE.url}/${locale}`, diff --git a/components/Book.tsx b/components/Book.tsx index ae2731b..c714e93 100644 --- a/components/Book.tsx +++ b/components/Book.tsx @@ -59,9 +59,7 @@ export function Book({ t, locale }: { t: Dictionary; locale: Locale }) { target="_blank" rel="noreferrer noopener" > - - {String(i + 1).padStart(2, '0')} - + {String(i + 1).padStart(2, '0')} {d.label} {d.handle} {d.note} diff --git a/components/BookingForm.tsx b/components/BookingForm.tsx index e4faf6c..9db89c2 100644 --- a/components/BookingForm.tsx +++ b/components/BookingForm.tsx @@ -102,10 +102,13 @@ export function BookingForm({ t, locale }: { t: Dictionary; locale: Locale }) { } if (body.fields) setErrors(body.fields); setState('failed'); - setFailure(body.error === 'rateLimited' ? t.booking.errors.rateLimited - : body.error === 'fileTooLarge' || body.error === 'fileType' - ? t.booking.errors.fileRejected - : t.booking.errors.failed); + setFailure( + body.error === 'rateLimited' + ? t.booking.errors.rateLimited + : body.error === 'fileTooLarge' || body.error === 'fileType' + ? t.booking.errors.fileRejected + : t.booking.errors.failed, + ); } catch { setState('failed'); setFailure(t.booking.errors.failed); @@ -127,10 +130,14 @@ export function BookingForm({ t, locale }: { t: Dictionary; locale: Locale }) {