Skip to content

Plugin sorts utilities with modifiers incorrectly if Tailwind is not installed #364

@probably-not

Description

@probably-not

What version of prettier-plugin-tailwindcss are you using?

For example: v0.6.11

What version of Tailwind CSS are you using?

For example: v4.0.11

What version of Node.js are you using?

For example: v22.5.1

What package manager are you using?

For example: npm

What operating system are you using?

For example: macOS

Reproduction URL

https://github.com/probably-not/repro-tailwind-prettier

Describe your issue

If I don't have Tailwind explicitly installed in my package.json or installed globally on my machine's system, the plugin will sort the utilities with modifiers incorrectly. Once tailwind is either installed on the system globally or installed in the package.json, then the utilities with modifiers will be properly sorted.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions