Skip to content

Releases: zipper/prettier-plugin-latte-tailwindcss

0.6.0

Choose a tag to compare

@github-actions github-actions released this 17 Apr 12:50

What's Changed

  • ✨ tailwindClassOrder option — 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/.json file 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.
  • 🐛 Fix n:class ternary 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-barriers collapsing newlines between sortable n:class tokens (#5).
    Multi-line n:class layouts (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

Choose a tag to compare

@github-actions github-actions released this 16 Apr 13:56

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 in n: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-barriers and normalize modes, spaces around ternary (?, :), PHP concatenation (.), and commas are now consistently normalized.
  • ✨ Preserve-mode consistency — preserve mode now correctly keeps original spacing around all operators untouched.

Full Changelog: 0.4.0...0.5.0

0.4.0

Choose a tag to compare

@github-actions github-actions released this 02 Apr 08:29

What's Changed

  • ⚠️ @tailwindcss/node is 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 like bg-[rgb(255,0,0)] or grid-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

Choose a tag to compare

@zipper zipper released this 02 Apr 08:28

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

Choose a tag to compare

@github-actions github-actions released this 01 Apr 15:26

What's Changed

  • 🛠️ Upgrade CI to Node.js 24 — updated actions/checkout and actions/setup-node to 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

Choose a tag to compare

@github-actions github-actions released this 01 Apr 15:21

What's Changed

  • 🔄 Renamed package to prettier-plugin-latte-tailwindcss — consistent with the official prettier-plugin-tailwindcss naming convention.

Full Changelog: 0.2.1...0.3.0

0.2.1

Choose a tag to compare

@github-actions github-actions released this 01 Apr 15:22

What's Changed

  • 🐛 Fix CJS type declarations — added missing index.d.cts to build output, fixing TypeScript resolution for CJS consumers.
  • 🐛 Fix README — corrected license badge URL, added missing tailwindPropertyOrder option 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

Choose a tag to compare

@github-actions github-actions released this 01 Apr 15:22

What's Changed

  • ✨ Custom CSS property ordering (#1) — new tailwindPropertyOrder option 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