Skip to content Code Standards
Style
- ES2023+ modules
- No transpilation, no build step
- 2-space indentation
- Single quotes for strings
- Semicolons required
Dependencies
- Zero runtime dependencies in core application
- Dev tooling (linting, testing) may use npm, but must not affect production bundle
- No CDN imports in production code
Documentation
- JSDoc types for all public functions
- Reference standards (EBU, ITU-R, IEC) where applicable
- Explain why, not just what
Architecture Principles
- Metering modules must be pure — no DOM access, no side effects
- UI components receive data — they do not fetch or calculate it
- All classes with resources implement
dispose()
- State flows through StateStore — no direct global mutation
- Runnable without server — must work from
file:// protocol using Chrome launcher (see launchers/)
Before Submitting
- Run
node tests/metering-verification.js — all tests must pass
- Open in Chrome, Firefox, and Safari — no console errors
- Verify no new dependencies in core
Pull Request Process
- Create feature branch from
main
- Make focused, single-purpose commits
- Update CHANGELOG.md under [Unreleased]
- Ensure CI passes (when implemented)
- Request review
Reporting Issues
- Include browser version and OS
- Include console output if applicable
- For metering accuracy issues, include test signal details and expected vs actual values