Warning about bad formats order or maybe some reordering of outputs object?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 467
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
If you use formats: ["jpeg", "webp", "avif"] the generateHTML utility will generate markup with <source> in the wrong order.
There is some intentional behavior there that we wouldn’t want to destroy, maybe you’d want "jpeg", "png" or "png", "webp". At this point in time "avif" should never be last though. And it’s very unlikely "webp" would come after "jpeg" or "png". I doubt you’d want "webp" before "avif" too.
So, not sure. I think warnings are in order so that we can lean towards teaching instead of using automation to protect from requiring the knowledge.
Contributor guide
No contributing guide indexed for this repository
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 at the generateHTML utility and trace how the formats array determines the order of generated elements. Clarify the intended ordering and warning conditions for jpeg, png, webp, and avif before implementing anything; done means the behavior is documented by tests or examples and inappropriate ordering produces the agreed warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100