Lint: flag data-volume values that are not numbers or fall outside 0 to 3.98
The documented range for data-volume is 0 to 3.98 (+12 dB) (docs/reference/html-schema.mdx). Values outside it are clamped silently (packages/core/src/audioGain.ts, around line 25), and non-numbers fall back to 1. So data-volume="80" (someone writing a percent) plays as a +12 dB boost, and data-volume="loud" plays at normal volume. Lint reports neither.
Scope
- Warn when
data-volumeisn't a finite number, or is below 0 or above 3.98. - The lint package doesn't depend on core, so add a test that keeps the 3.98 limit in sync with
audioGain.ts.
Files: packages/lint/src/rules/media.ts, packages/lint/src/rules/media.test.ts
Done when: a test shows 80, -1 and loud warn, while 0, 1 and 3.98 don't.
Mentor: @jrusso1020. Comment here before you start so we can avoid duplicate PRs.
Hi, I'd like to take this one — I'll add the data-volume lint warnings in packages/lint/src/rules/media.ts with tests for 80, -1, loud (warn) and 0, 1, 3.98 (no warn), plus the limit-sync test against audioGain.ts.