You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prettier-plugin-tailwindcss (0.8.1) does not sort classes in .astro files with prettier-plugin-astro 1.x — the 1.x parser emits a JSX-shaped AST (AstroRoot/JSXElement/ JSXAttribute) the Tailwind plugin does not walk. .tsx is sorted normally.
# clone & enter repo
git clone https://github.com/tailwindlabs/prettier-plugin-tailwindcss.git &&cd prettier-plugin-tailwindcss
# install dependencies & build project (creates /dist folder)
bun install && bun run build
# link plugin globally
bun link
# link plugin in your projectcd ../your-project
bun link prettier-plugin-tailwindcss # or add to this line to deps "prettier-plugin-tailwindcss": "link:prettier-plugin-tailwindcss"
Activity
victormscn commentedon Feb 21, 2026
Same for the latest version of Angular
inomish commentedon Jun 7, 2026
Neither with svelte
Eptagone commentedon Sep 23, 2026
This used to work before. Now it doesn't
pmdci commentedon Sep 27, 2026
Happened to me in Astro 7 as well.
prettier-plugin-tailwindcss(0.8.1) does not sort classes in.astrofiles withprettier-plugin-astro1.x — the 1.x parser emits a JSX-shaped AST (AstroRoot/JSXElement/JSXAttribute) the Tailwind plugin does not walk..tsxis sorted normally.dauniel000 commentedon Sep 29, 2026
commit #473 resolved the issue
steps i did using bun
this is my .prettierrc configuration
{ "plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], "tailwindStylesheet": "./src/styles/global.css", "overrides": [ { "files": "*.astro", "options": { "parser": "astro" } } ] }