Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
Fixed
- Don't remove escape sequences when sorting classes in JavaScript string literals, which could produce invalid code in Vue attribute expressions (#461)
- Restore class sorting in Svelte markup and dynamic
class={...} expressions when using prettier-plugin-svelte v4 (#462)
0.8.0 - 2026-04-27
Changed
- Require at least Prettier 3.7.x (#420)
Added
- Export public sorting APIs to
/sorter (#438)
Fixed
- Remove top-level await (#420)
- Improve load-time performance (#420)
- Improve config resolution caching with directory-based cache (#432)
- Load compatible plugins on demand and tighten plugin detection (#437)
- Load v3/v4 modules only when needed (#439)
- Remove recast/ast-types deps and optimize dynamic JS attribute handling (#440)
- Remove unused deps (#441)
- Use the plugin that has already been imported rather than dynamically importing it again (#442)
- Skip visiting non-node children (#443)
- Optimize whitespace-only class detection (#429)
- Fix v3 config loading with Jiti re-exports (#448)
- Collapse whitespace in template literals with adjacent quasis (#427)
- Improve
canCollapseWhitespaceIn handling for "tailwindPreserveWhitespace": true (#428)
0.7.2 - 2025-12-01
Fixed
- Load compatible plugins sequentially to work around race conditions in Node.js (#412)
- Fix compatibility with
prettier-plugin-svelte when using Prettier v3.7+ (#418)
0.7.1 - 2025-10-17
Fixed
- Match against correct name of dynamic attributes when using regexes (#410)
0.7.0 - 2025-10-14
Added
- Format quotes in
@source, @plugin, and @config (#387)
- Sort in function calls in Twig (#358)
- Sort in callable template literals (#367)
- Sort in function calls mixed with property accesses (#367)
- Support regular expression patterns for attributes (#405)
- Support regular expression patterns for function names (#405)
Changed
- Improved monorepo support by loading Tailwind CSS relative to the input file instead of prettier config file (#386)
- Improved monorepo support by loading v3 configs relative to the input file instead of prettier config file (#386)
- Fallback to Tailwind CSS v4 instead of v3 by default (#390)
- Don't augment global Prettier
ParserOptions and RequiredOptions types (#354)
- Drop support for
prettier-plugin-import-sort (#385)
Fixed
- Handle quote escapes in LESS when sorting
@apply (#392)
- Fix whitespace removal inside nested concat and template expressions (#396)
0.6.14 - 2025-07-09
- Add support for OXC + Hermes Prettier plugins (#376, #380)
- Sort template literals in Angular expressions (#377)
- Don't repeatedly add backslashes to escape sequences when formatting (#381)
0.6.13 - 2025-06-19
- Prevent Svelte files from breaking when there are duplicate classes (#359)
- Ensure
prettier-plugin-multiline-arrays and prettier-plugin-jsdoc work when used together with this plugin (#372)
0.6.12 - 2025-05-30
- Add internal (unsupported) option to load Tailwind CSS using a different package name (#366)
0.6.11 - 2025-01-23
- Support TypeScript configs and plugins when using v4 (#342)
0.6.10 - 2025-01-15
- Add support for
@zackad/prettier-plugin-twig (#327)
- Drop support for
@zackad/prettier-plugin-twig-melody (#327)
- Update Prettier options types (#325)
- Don't remove whitespace inside template literals in Svelte (#332)
0.6.9 - 2024-11-19
- Introduce
tailwindStylesheet option to replace tailwindEntryPoint (#330)
0.6.8 - 2024-09-24
0.6.7 - 2024-09-24
- Improved performance with large Svelte, Liquid, and Angular files (#312)
- Add support for
@plugin and @config in v4 (#316)
- Add support for Tailwind CSS v4.0.0-alpha.25 (#317)
0.6.6 - 2024-08-09
- Add support for
prettier-plugin-multiline-arrays (#299)
- Add resolution cache for known plugins (#301)
- Support Tailwind CSS
v4.0.0-alpha.19 (#310)
0.6.5 - 2024-06-17
- Only re-apply string escaping when necessary (#295)
0.6.4 - 2024-06-12
- Export
PluginOptions type (#292)
0.6.3 - 2024-06-11
- Improve detection of string concatenation (#288)
0.6.2 - 2024-06-07
Changed
- Only remove duplicate Tailwind classes (#277)
- Make sure escapes in classes are preserved in string literals (#286)
0.6.1 - 2024-05-31
Added
- Add new
tailwindPreserveDuplicates option to disable removal of duplicate classes (#276)
Fixed
- Improve handling of whitespace removal when concatenating strings (#276)
- Fix a bug where Angular expressions may produce invalid code after sorting (#276)
- Disabled whitespace and duplicate class removal for Liquid and Svelte (#276)
0.6.0 - 2024-05-30
Changed
- Remove duplicate classes (#272)
- Remove extra whitespace around classes (#272)
0.5.14 - 2024-04-15
Fixed
- Fix detection of v4 projects on Windows (#265)
0.5.13 - 2024-03-27
Added
- Add support for
@zackad/prettier-plugin-twig-melody (#255)
0.5.12 - 2024-03-06
Added
- Add support for
prettier-plugin-sort-imports (#241)
- Add support for Tailwind CSS v4.0 (#249)
0.5.11 - 2024-01-05
Changed
- Bumped bundled version of Tailwind CSS to v3.4.1 (#240)
0.5.10 - 2023-12-28
Changed
- Bumped bundled version of Tailwind CSS to v3.4 (#235)
0.5.9 - 2023-12-05
Fixed
- Fixed location of embedded preflight CSS file (#231)
0.5.8 - 2023-12-05
Added
- Re-enable support for
prettier-plugin-marko (#229)
0.5.7 - 2023-11-08
Fixed
- Fix sorting inside dynamic custom attributes (#225)
0.5.6 - 2023-10-12
Fixed
- Fix sorting inside
{{ … }} expressions when using @shopify/prettier-plugin-liquid v1.3+ (#222)
0.5.5 - 2023-10-03
Fixed
- Sort classes inside
className in Astro (#215)
- Support member access on function calls (#218)
0.5.4 - 2023-08-31
Fixed
- Type
tailwindFunctions and tailwindAttributes as optional (#206)
- Don’t break
@apply … #{'!important'} sorting in SCSS (#212)
0.5.3 - 2023-08-15
Fixed
- Fix CJS
__dirname interop on Windows (#204)
0.5.2 - 2023-08-11
Fixed
- Fix intertop with bundled CJS dependencies (#199)
0.5.1 - 2023-08-10
Fixed
- Updated Prettier peer dependency (#197)
0.5.0 - 2023-08-10
Added
- Sort expressions in Astro's
class:list attribute (#192)
- Re-enabled support for plugins when using Prettier v3+ (#195)
0.4.1 - 2023-07-14
Fixed
- Don't move partial classes inside Twig attributes (#184)
0.4.0 - 2023-07-11
Added
- Export types for Prettier config (#162)
- Add Prettier v3 support (#179)
Fixed
- Don't move partial classes inside Liquid script attributes (#164)
- Do not split classes by non-ASCII whitespace (#166)
- Match tagged template literals with tag expressions (#169)
0.3.0 - 2023-05-15
Added
- Added support for
prettier-plugin-marko (#151)
- Allow sorting of custom attributes, functions, and tagged template literals (#155)
Fixed
- Speed up formatting (#153)
- Fix plugin compatibility when loaded with require (#159)
0.2.8 - 2023-04-28
Changed
- Remove support for
@prettier/plugin-php (#152)
0.2.7 - 2023-04-05
Fixed
- Don't break liquid tags inside attributes when sorting classes (#143)
0.2.6 - 2023-03-29
Added
- Support ESM and TS config files (#137)
Fixed
- Load
tailwindcss modules from nearest instance only (#139)
0.2.5 - 2023-03-17
Fixed
- Fix class sorting in
capture liquid tag (#131)
0.2.4 - 2023-03-02
Fixed
- Sort
class attribute on components and custom elements in Astro (#129)
0.2.3 - 2023-02-15
Fixed
- Don't sort classes in Glimmer
concat helper (#119)
- Add support for
@ianvs/prettier-plugin-sort-imports (#122)
0.2.2 - 2023-01-24
Fixed
- Add prettier plugins to peer dependencies (#114)
- Traverse await expression blocks in Svelte (#118)
0.2.1 - 2022-12-08
Fixed
- Fix support for latest Shopify Liquid plugin (#109)
0.2.0 - 2022-11-25
Changed
- Don't bundle
prettier-plugin-svelte (#101)
Added
- Improve compatibility with other Prettier plugins (#101, #102)
0.1.13 - 2022-07-25
Fixed
- Fix error when using Angular pipes (#86)
0.1.12 - 2022-07-07
Added
- Add support for Glimmer / Handlebars (#83)
0.1.11 - 2022-05-16
Changed
- Update
prettier-plugin-svelte to v2.7.0 (#77)
Fixed
- Fix sorting in Svelte
:else blocks (#79)
0.1.10 - 2022-04-20
Removed
- Remove whitespace tidying and duplicate class removal due to issues with whitespace removal (#72)
0.1.9 - 2022-04-19
Added
- Add license file (#64)
- Add whitespace tidying and duplicate class removal (#70)
0.1.8 - 2022-02-24
Changed
- Use Tailwind's
getClassOrder API when available (#57)
Fixed
- Fix Tailwind config file resolution when Prettier config file is not present (#62)
0.1.7 - 2022-02-09
Fixed
- Fix single quotes being converted to double quotes (#51)
0.1.6 - 2022-02-08
Fixed
- Fix error when no Prettier options provided (#46)
0.1.5 - 2022-02-04
Added
- Add support for MDX (#30)
Fixed
- Fix error when formatting Svelte files that contain
let:class attributes (#24)
0.1.4 - 2022-01-25
Fixed
- Handle empty class attributes (#17)
- Handle TypeScript syntax in Vue/Angular class attributes (#18)
0.1.3 - 2022-01-24
Fixed
- Ignore
!important when sorting @apply classes (#4)
0.1.2 - 2022-01-24
Fixed
- Fix error when using nullish coalescing operator in Vue/Angular (#2)