prettier-plugin-tailwindcss

A Prettier plugin for Tailwind CSS that automatically sorts classes based on our recommended class order.

MIT License

Downloads
8.9M
Stars
4.8K
Committers
30

Bot releases are visible (Hide)

prettier-plugin-tailwindcss - v0.2.6

Published by bradlc over 1 year ago

Added

  • Support ESM and TS config files (#137)

Fixed

  • Load tailwindcss modules from nearest instance only (#139)
prettier-plugin-tailwindcss - v0.2.5

Published by thecrypticace over 1 year ago

Fixed

  • Fix class sorting in capture liquid tag (#131)
prettier-plugin-tailwindcss - v0.2.4

Published by thecrypticace over 1 year ago

Fixed

  • Add support for sorting class attribute on custom elements and Astro components (#129)
prettier-plugin-tailwindcss - v0.2.3

Published by thecrypticace over 1 year ago

Fixed

  • Don't sort classes in Glimmer concat helper (#119)
  • Add support for @ianvs/prettier-plugin-sort-imports (#122)
prettier-plugin-tailwindcss - v0.2.2

Published by thecrypticace over 1 year ago

Fixed

  • Add prettier plugins to peer dependencies (#114)
  • Traverse await expression blocks in Svelte (#118)
prettier-plugin-tailwindcss - v0.2.1

Published by thecrypticace almost 2 years ago

Fixed

  • Fix support for latest Shopify Liquid plugin (#109)
prettier-plugin-tailwindcss - v0.2.0

Published by reinink almost 2 years ago

Changed

  • Don't bundle prettier-plugin-svelte (#101)

Added

  • Improve compatibility with other Prettier plugins (#101, #102)

Upgrading from v0.1.x for Svelte users

As of v0.2.0 we no longer bundle prettier-plugin-svelte as part of this plugin, so to bring back formatting for Svelte code you need to explicitly install that dependency yourself:

npm install -D prettier-plugin-svelte

Next, disable autoloading by setting pluginSearchDirs to false in your Prettier configuration, and add any plugins you're using to your plugins list, making sure prettier-plugin-tailwindcss is last in the list:

// .prettierrc
{
  // ..
  "plugins": [
    "prettier-plugin-svelte",
    "prettier-plugin-tailwindcss" // Must come last
  ],
  "pluginSearchDirs": false
}
prettier-plugin-tailwindcss - v0.1.13

Published by bradlc about 2 years ago

Fixed

  • Fix error when using Angular pipes (#86)
prettier-plugin-tailwindcss - v0.1.12

Published by bradlc over 2 years ago

Added

  • Add support for Glimmer / Handlebars (#83)
prettier-plugin-tailwindcss - v0.1.11

Published by bradlc over 2 years ago

Changed

  • Update prettier-plugin-svelte to v2.7.0 (#77)

Fixed

  • Fix sorting in Svelte :else blocks (#79)
prettier-plugin-tailwindcss - v0.1.10

Published by bradlc over 2 years ago

Removed

  • Remove whitespace tidying and duplicate class removal due to issues with whitespace removal (#72)
prettier-plugin-tailwindcss - v0.1.9

Published by bradlc over 2 years ago

Added

  • Add license file (#64)
  • Add whitespace tidying and duplicate class removal (#70)
prettier-plugin-tailwindcss - v0.1.8

Published by bradlc over 2 years ago

Changed

  • Use Tailwind's getClassOrder API when available (#57)

Fixed

  • Fix Tailwind config file resolution when Prettier config file is not present (#62)
prettier-plugin-tailwindcss - v0.1.7

Published by bradlc over 2 years ago

Fixed

  • Fix single quotes being converted to double quotes (#51)
prettier-plugin-tailwindcss - v0.1.6

Published by bradlc over 2 years ago

Fixed

  • Fix error when no Prettier options provided (#46)
prettier-plugin-tailwindcss - v0.1.5

Published by bradlc over 2 years ago

Added

  • Add support for MDX (#30)

Fixed

  • Fix error when formatting Svelte files that contain let:class attributes (#24)
prettier-plugin-tailwindcss - v0.1.4

Published by bradlc over 2 years ago

Fixed

  • Handle empty class attributes (#17)
  • Handle TypeScript syntax in Vue/Angular class attributes (#18)
prettier-plugin-tailwindcss - v0.1.3

Published by bradlc over 2 years ago

Fixed

  • Ignore !important when sorting @apply classes (#4)
prettier-plugin-tailwindcss - v0.1.2

Published by bradlc over 2 years ago

Fixed

  • Fix error when using nullish coalescing operator in Vue/Angular (#2)
Package Rankings
Top 0.84% on Npmjs.org
Top 6.69% on Proxy.golang.org