NiklasPor / prettier-plugin-organize-attributes

Organize your HTML attributes automatically with Prettier ๐Ÿงผ
MIT License
197 stars 12 forks source link

Incompatibility with other Prettier plugins #14

Closed cmalard closed 1 year ago

cmalard commented 1 year ago

https://github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/31

Workaround: https://github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/31#issuecomment-1195411734

NiklasPor commented 1 year ago

Interesting, didn't know that a workaround actually exists.

cmalard commented 1 year ago

It is not actually, or failed to understand how Prettier manages it ^^" After few hours on it, I've just the feeling that we are fighting against Prettier will that do not want to do anything related to sort through it ^^"

cmalard commented 1 year ago

Waiting for https://github.com/angular-eslint/angular-eslint/pull/1066, I went for a dirty solution ๐Ÿ™ˆ -> I run Prettier multiple times, one for each plugin ๐Ÿ˜…

It doesn't work in IDEs that runs Prettier with all plugins at the same time, so I'm relying on husky & lint-staged to run it automatically before committing (I was already using them to run Prettier, ESLint & other stuff).

matchai commented 1 year ago

This issue has since been addressed by prettier-plugin-tailwind. You can refer to their README for configuration to get it working correctly: https://github.com/tailwindlabs/prettier-plugin-tailwindcss#compatibility-with-other-prettier-plugins