unstale

npm / prettier-plugin-astro

prettier-plugin-astro

What changed in prettier-plugin-astro 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.

2 breaking2 new APIs and options1 behavior and defaults1 tooling6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.7 on npm

prettier-plugin-astro 112 changes

Breaking changes 2

  • The minimum supported Node version is now 22.12.0.

    1.0.0release notes

  • Whitespace formatting now matches Astro’s whitespace handling.

    1.0.0release notes

New APIs and options 2

  • Adds three formatting modes: preserve shorthand as written when unset, transform eligible attributes to shorthand when true, or expand them when false.

    1.1.0release notes

  • A Prettier option was added to match Astro’s compressHTML setting; set it to match if compressHTML is set in Astro config.

    1.0.0release notes

Behavior and default changes 1

  • Formatting more closely matches Prettier's built-in JSX and HTML formatting, reducing cosmetic differences between files.

    1.0.0release notes

Tooling 1

  • TypeScript declarations are now published for Astro plugin options, enabling TypeScript support when working with those options.

    1.0.1release notes

Fixes and other changes 6

  • Fixes a TypeError when a comment appears before a statement inside a template expression.

    1.1.1release notes

  • Fixes non-idempotent indentation of multiline comments nested inside CSS rules.

    1.1.0release notes

  • Fixes raw elements being forcefully paired up when self-closed.

    1.1.0release notes

  • Fixes non-idempotent CSS <style> block formatting when astroCompressHTML is set to 'html' or 'none'.

    1.0.1release notes

  • Fixes an error when a JavaScript comment appears before a raw or custom-printed element, such as a <script> in the alternate branch of a conditional expression.

    1.0.1release notes

  • The rewrite fixes issues with certain elements not being handled properly inside expressions.

    1.0.0release notes