shufo / blade-formatter

An opinionated blade template formatter for Laravel that respects readability
https://www.npmjs.com/package/blade-formatter
MIT License
441 stars 24 forks source link

[Feature]: Sort Tailwind CSS classes in HTML attributes other than "class" #797

Open kubikill opened 1 year ago

kubikill commented 1 year ago

Description

It would be great if there was an option to have blade-formatter also sort Tailwind CSS classes in HTML attributes other than class. This would be useful for Blade components that use HTML attributes other than class to add classes to child elements of the component. Any chance this could be added to prettier-plugin-blade as well?

Suggested Solution

Add an option that would allow to specify in which HTML attributes blade-formatter should sort Tailwind CSS classes.

Alternatives

No response

Additional Context

No response

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

beholdr commented 5 months ago

Yeah, this would be great! Because it's a common pattern to set components classes like this {{ $attributes->class('border border-gray-200 rounded-lg overflow-hidden divide-y divide-gray-200') }} and currently it's not get sorted.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days