Cannot seem to get sortTailwindcssClasses working in VSCode
See original GitHub issueI cannot seem to get the Tailwindcss auto sorting working in VSCode. On save it does seem to use the prettier-plugin-blade package.
I’m testing this by juggling some Tailwind classes in my blade template into a random order. What am I doing wrong?
{
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 150,
"useTabs": true,
"tabWidth": 1,
"plugins": ["@shufo/prettier-plugin-blade"],
"overrides": [
{
"files": ["*.blade.php"],
"options": {
"parser": "blade",
"printWidth": 999,
"sortTailwindcssClasses": true,
"wrapAttributes": "auto",
"sortHtmlAttributes": "none",
"noPhpSyntaxCheck": false
}
}
]
}
Saving a .blade.php file
["INFO" - 3:47:23 PM] Prettier Options:
{
"filepath": "/mypath/resources/views/vp-account-settings.blade.php",
"parser": "blade",
"useTabs": true,
"tabWidth": 1,
"endOfLine": "lf",
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 999,
"plugins": [
"/mypath/node_modules/@shufo/prettier-plugin-blade/dist/index.js"
],
"sortTailwindcssClasses": true,
"wrapAttributes": "auto",
"sortHtmlAttributes": "none",
"noPhpSyntaxCheck": false
}
["INFO" - 3:47:23 PM] Formatting completed in 139ms.```
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Automatic Class Sorting with Prettier
This means that any classes in the base layer will be sorted first, followed by classes in the components layer, and then finally...
Read more >My TailWind CSS Intellisense plugin just isn't working on ...
I'm using tailwindcss in a react app. Tailwindcss Intellisense plugin was not working in my VSCode but then i installed HTML CSS Support ......
Read more >Sorting not working with postcss in VSCode · Issue #186
Trying to sort classes in a .css / .pcss file does not work with ... Open the VSCode command pallet and run >Headwind:...
Read more >Sorting Tailwind CSS Classes Automatically with Prettier
In this video, I'll show you how to set up Prettier and the new Prettier plugin for Tailwind CSS, which will sort your...
Read more >Enable Automatic Tailwind Class Sorting in 4 Minutes
For anyone looking to sort Tailwind classes in Blade files, I found this Prettier plugin that worked great for me: https://github.com/shufo/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for creating the issue. I’ll look into it.
Any progress in this?