Skip to content

fix: support prettier-plugin-astro v1 - #473

Merged
Boshen merged 1 commit into
tailwindlabs:mainfrom
leaysgur:fix/astro-v1
Sep 29, 2026
Merged

Boshen merged 1 commit into
tailwindlabs:mainfrom
leaysgur:fix/astro-v1

Conversation

@leaysgur

@leaysgur leaysgur commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

prettier-plugin-astro v1 has been released, but it emits an ESTree/JSX AST from @astrojs/compiler-rs instead of its own element/attribute nodes (v0.x), so the Astro transform silently matched nothing.

Delegate to the JavaScript transform for the new root type and let dynamic attrs like class:list through the JSX attribute handler.

NOTE: Not breaking, v0.x is still supported alongside v1.
devDependencies follow the Svelte precedent (#462): track the latest major only.

@Boshen

Boshen commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

@Princesseuh Can you help with review, thank you in advance!

@Princesseuh Princesseuh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me!

@Boshen
Boshen merged commit 5b27f94 into tailwindlabs:main Sep 29, 2026
1 check passed
@leaysgur
leaysgur deleted the fix/astro-v1 branch September 29, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants