Astro files formatting Install the plugins pnpm/npm add/install -D prettier prettier-plugin-astro Paste this code into your file ".prettierrc.mjs" // .prettierrc.mjs /** @type {import("prettier").Config} */ export default { plugins: ["prettier-plugin-astro"], arrowParens: "always", bracketSameLine: false, bracketSpacing: true, semi: true, experimentalTernaries: false, singleQuote: true, jsxSingleQuote: true, quoteProps: "as-needed", trailingComma: "all", singleAttributePerLine: false, htmlWhitespaceSensitivity: "css", vueIndentScriptAndStyle: false, proseWrap: "preserve", insertPragma: false, printWidth: 80, requirePragma: false, tabWidth: 2, useTabs: false, embeddedLanguageFormatting: "auto", overrides: [ { files: "*.astro", options: { parser: "astro", }, }, ], };