htmlhint / HTMLHint

⚙️ The static code analysis tool you need for your HTML
https://htmlhint.com
MIT License
3.08k stars 383 forks source link

Implement HTML tag-dependent sorting for `attr-sorted` #1374

Open hyperupcall opened 11 months ago

hyperupcall commented 11 months ago

Is your feature request related to a problem? Please describe.

Currently, attr-sorted is a native rule, sorting a limited set of properties.

There are many properties missing, and adding all properties in a single way is hard to maintain.

Describe the solution you'd like

This could be fixed by sorting HTML attributes specific to a particular tag.

Additionally, by making sorting per-HTML tag, this would make overriding the configuration easier and less-repetitive

Describe alternatives you've considered

Not doing this