Implement HTML tag-dependent sorting for `attr-sorted`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 474
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 12
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/core/rules/attr-sorted.ts, the current native rule and its limited property set. Trace how the rule configuration is defined and overridden, then determine how tag-specific sorting should be represented. Done means attributes can be sorted according to the relevant HTML tag while configuration overrides are less repetitive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100