[Prettier Plugin] Possible to sort classes in Shopify Liquid parameters? #19932
Unanswered
selvinkuik
asked this question in
Help
Replies: 1 comment
-
|
I do not believe there is a .prettierrc option today that will sort Tailwind classes inside this Liquid filter-argument pattern: image_tag: class: '...' The plugin sorts class lists in syntaxes it can parse directly (for example normal class attributes, and supported function-call strings via configuration). This Liquid parameter form is usually outside those supported extraction patterns. Practical workarounds:
If maintainers are open to it, this looks like a good feature request specifically for Liquid filter-argument parsing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys, I have a question about sorting classes using
prettier-plugin-tailwindcss. Take this example code which renders an image tag using Liquid and applies some classes:{{ section.settings.primary_image | image_url: width: section.settings.primary_image.width | image_tag: class: 'object-cover size-full md:mt-0 mt-5' }}Is there a
.prettierrcsetting that can get the plugin to sort the classes passed in as a parameter?Beta Was this translation helpful? Give feedback.
All reactions