Astro + Prettier
Opinionated code formatter. This page shows exactly what pickstack adds to a Astro project for Prettier: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.
$ npm create pickstack@latest my-app -- --framework astro --modules prettier --yesCustomize in the configurator
Packages it adds
| Package | Version | Type |
|---|---|---|
prettier | ^3.10.1 | dev |
prettier-plugin-astro | ^1.1.2 | dev |
New files
dist .astro pnpm-lock.yaml package-lock.json yarn.lock bun.lock
{
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
Changes to existing files
⋯ 4 unchanged lines <Layout title="About"> <section class="page"> <h1 class="title">About</h1>+ <p class="text">Built with Astro, TypeScript, Prettier.</p>− <p class="text">Built with Astro, TypeScript.</p> </section> </Layout>
Project files
.gitignore.prettierignore.prettierrcREADME.mdastro.config.mjspackage.jsonsrc/components/Counter.astrosrc/layouts/Layout.astrosrc/pages/about.astrosrc/pages/index.astrosrc/styles/global.csstsconfig.json