Repository navigation
Releases: zipper/prettier-plugin-latte-tailwindcss
Releases · zipper/prettier-plugin-latte-tailwindcss
Release list
0.6.0
What's Changed
- ✨
tailwindClassOrderoption — configurable class ordering through buckets (#5).
Priority-based matching: explicit{pattern}buckets always win over"unknown"/"tailwind"catchalls, regardless of position in the config. Bucket order in the config controls output order only. Value is a string — path to a.js/.jsonfile or a JSON-encoded array. See docs/options.md.
Typical use cases:- Push
js-*hooks (or any behaviour-only markers) to the end of the class list. - Keep BEM modifiers next to the base class (
icon icon--check-circle) so they stay grouped even when the base class is a known Tailwind utility and the modifier isn't. - Pull component-like utilities (
h[1-6], multi-property utilities) up front. - Separate project-specific class families from generic Tailwind utilities.
- Push
- 🐛 Fix
n:classternary branches containing PHP concatenation (#5).
A branch like$x ? 'foo bar' . $y->method()used to be split on whitespace and fed to the class sorter — the. $y->method()fragment ended up in the middle of the class list, breaking the template. Conditional branches that aren't plain single-quoted strings are now treated atomically. - 🐛 Fix
normalize-barrierscollapsing newlines between sortablen:classtokens (#5).
Multi-linen:classlayouts (one token per line) had their newlines collapsed into a single-space,separator after sorting. Newlines in the original input are now preserved; only horizontal-only separators still collapse to,.
Full Changelog: 0.5.0...0.6.0
0.5.0
What's Changed
- 🐛 Fix newlines treated as barriers in preserveWhitespace mode — newlines within class strings no longer incorrectly split sorting groups.
- 🐛 Fix PHP concatenation expressions classified as barriers —
'icon--' . $icon['icon']is now correctly recognized as a barrier token inn:class. - 🐛 Fix classRegex isSafeCapture rejecting non-class content — inner regex captures containing
$,{,}, or<>are now safely skipped instead of corrupting output. - ✨ Normalize whitespace around operators in n:class — in
normalize-barriersandnormalizemodes, spaces around ternary (?,:), PHP concatenation (.), and commas are now consistently normalized. - ✨ Preserve-mode consistency —
preservemode now correctly keeps original spacing around all operators untouched.
Full Changelog: 0.4.0...0.5.0
0.4.0
What's Changed
⚠️ @tailwindcss/nodeis now a required peer dependency (#4).
Previously optional, but the plugin does not function without it — class sorting is its sole purpose. If you already use Tailwind CSS v4, you likely have it installed.- 🐛 Allow commas in classRegex captures for Tailwind arbitrary values (#3).
Values likebg-[rgb(255,0,0)]orgrid-cols-[1fr,auto]contain commas that were incorrectly rejected by the safety check, causing the entire class string to be skipped.
Full Changelog: 0.3.2...0.4.0
0.3.2
What's Changed
- 🛠️ Replace softprops/action-gh-release with native gh CLI — simplify release workflow by using gh CLI directly.
Full Changelog: 0.3.1...0.3.2
0.3.1
What's Changed
- 🛠️ Upgrade CI to Node.js 24 — updated
actions/checkoutandactions/setup-nodeto v5, switched CI and release workflows to Node.js 24. - 🛠️ Add
.nvmrc— pin Node.js version for local development.
Full Changelog: 0.3.0...0.3.1
0.3.0
What's Changed
- 🔄 Renamed package to
prettier-plugin-latte-tailwindcss— consistent with the officialprettier-plugin-tailwindcssnaming convention.
Full Changelog: 0.2.1...0.3.0
0.2.1
What's Changed
- 🐛 Fix CJS type declarations — added missing
index.d.ctsto build output, fixing TypeScript resolution for CJS consumers. - 🐛 Fix README — corrected license badge URL, added missing
tailwindPropertyOrderoption to the options table. - 🛠️ Trusted publishing — switched npm publish from token-based auth to OIDC trusted publishing, upgraded release workflow to Node.js 24.
Full Changelog: 0.2.0...0.2.1
0.2.0
What's Changed
- ✨ Custom CSS property ordering (#1) — new
tailwindPropertyOrderoption that sorts Tailwind classes by CSS property order instead of Tailwind's default. Compatible with ─ stylelint-order configuration (e.g.stylelint-config-hudochenkov/order). - 🛠️ ESLint with Prettier integration (#2) — ESLint 10 + typescript-eslint + eslint-plugin-prettier, matching pd-naja/pd-modal code style.
- 🛠️ CI/CD improvements — split CI and Release into separate workflows, added lint step, GitHub Release draft on tag push.
Full Changelog: 0.1.0...0.2.0