Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with @shopify/prettier-plugin-liquid #108

Closed
codebaas opened this issue Dec 7, 2022 · 3 comments · Fixed by #109
Closed

Compatibility with @shopify/prettier-plugin-liquid #108

codebaas opened this issue Dec 7, 2022 · 3 comments · Fixed by #109
Assignees

Comments

@codebaas
Copy link

codebaas commented Dec 7, 2022

The compatibility with @shopify/prettier-plugin-liquid doesn't work right. The follow code will not be formatted. When you use the liquid-html parser. Only with the html parser

<a class="sm:p-0 p-4" href="https://www.example.com">Example</a>
<a class="p-4 sm:p-0" href="https://www.example.com">Example</a>

Prettier config

{
  "plugins": ["@shopify/prettier-plugin-liquid", "prettier-plugin-tailwindcss"],
  "pluginSearchDirs": false,
  "parser": "liquid-html"
}

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

What version of @shopify/prettier-plugin-liquid are you using?
1.0.0-rc.2 and 0.4.3 (tested both)

What version of Tailwind CSS are you using?
3.2.4

What version of Node.js are you using?
v18.12.1

What package manager are you using?
NPM

What operating system are you using?
Mac os

@thecrypticace
Copy link
Contributor

Hey, @codebaas, thanks for the report.

I tested with v0.4.3 and our plugin works as expected from what I can tell? Can you provide a reproduction of it not working with that version? There was a breaking change in the v1.0.0-rc.0 which broke our class attribute detection which I've opened a PR to fix.

@thecrypticace
Copy link
Contributor

I've merged in the fix which will go out in our next tagged release. If you can provide a reproduction for v0.4.3 where it doesn't work I'll take a look and see if there's anything else we can / need to fix there. Otherwise, I will tag a point release tomorrow with the fix.

@codebaas
Copy link
Author

codebaas commented Dec 8, 2022

Hi @thecrypticace

Thanks for your quick reply. It finally works. I switched to version 0.4.3 and installed my git project from scratch again. Because I am using the prettier VSC extension I wanted to be sure it was not related to my VSC project. Cause i had changed yesterday some VSC settings related.

Thanks again for the quick reply and making a new fix for the release for v1.0.0-rc.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants