Skip to content
Discussion options

You must be logged in to vote

Hi Jonas—Thanks for this!

There are a few different points here:

  • The Tailwind Prettier plugin has never worked with PHP files, to my knowledge.
  • It used to work with CSS and HTML files with the configuration in _tw, but I also found that it no longer does.
  • _tw used to support class sorting in PHP files via this ESLint plugin, but that plugin doesn't support Tailwind 4 yet. Once it does, I'll add support back.

I tried your solution above. Did you need to install something to support ...(extends)? It doesn't work for me as written.

I think I'll likely fix this with a prettier.config.mjs file. I used this:

import wordpressPrettierConfig from '@wordpress/prettier-config';

export default {
	...

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@gregsullivan
Comment options

Answer selected by Jonasba1999
@gregsullivan
Comment options

@SpyrosMakaronas-KSO
Comment options

@gregsullivan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants