Files
poli0981-dev/prettier.config.mjs
poli0981andClaude Opus 4.8 f802bc4203 feat: Foundation → P1 — bilingual Astro + Cloudflare site (local-first)
Implements the Foundation → P1 scope: a bilingual (vi default, en under
/en/) personal site for Kokone / SkullMute, fully runnable locally.

Scaffold & tooling
- Astro 7 + @astrojs/cloudflare v14 + Svelte 5 islands + Tailwind v4
  (@theme) + self-hosted Fonts API + built-in CSP (Prism highlighting).
- eslint (flat) + prettier (+astro/svelte/tailwind) + lefthook + knip;
  strict TypeScript.

Design system & chrome
- Runtime-var theming (dark "midnight ink" / light "old paper") via
  [data-theme]; 4 VN-subset fonts, exactly 2 first-paint preloads.
- Waveline signature (requestAnimationFrame — no GSAP), grain overlay.
- i18n seam (src/i18n/routing.ts), Header/Footer/MobileTabBar,
  ThemeToggle, LangSwitch, accessible MenuSheet.

Content & pages
- Content Collections (Zod): blog, stories, projects, faq, gallery, legal.
- Blog (index/post/tag), Stories + reader (content-warning gate,
  ReadingControls: size + independent reader theme + progress), Home,
  About, Projects, Q&A, Links, 5 bilingual Legal pages — all with /en/
  twins + translationKey pairing.

Platform
- LegalGateSheet first-visit notice; error pages 404/500/403/429/offline;
  middleware: security headers, www->apex, denylist->403 & /api rate-limit
  ->429 served from prerendered assets via the ASSETS binding.

Verified locally: build/check/lint/format/knip all pass; 39 pages;
CSP console-clean; error matrix under `astro preview`. Perf: HTML ~9KB
gz, island JS 25KB gz, 2 font preloads (48KB).

Deferred to a later plan: live deploy + domain + secrets, widgets worker
(YouTube/Steam/GitHub + KV cron), gallery + exif scripts, Pagefind
search, RSS/sitemap/OG images, bug-report pipeline, offline service
worker, CI/CD reusable workflows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 14:30:11 +07:00

12 lines
438 B
JavaScript

/** @type {import("prettier").Config} */
export default {
printWidth: 100,
singleQuote: false,
semi: true,
trailingComma: "all",
// tailwindcss plugin MUST be last so it can reorder classes after the others parse.
plugins: ["prettier-plugin-astro", "prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
tailwindStylesheet: "./src/styles/global.css",
overrides: [{ files: "*.astro", options: { parser: "astro" } }],
};