#!/usr/bin/env node // ============================================================ // STATIC REFERENCE LINTER // ============================================================ // Scans public/js/ for DOM id references and verifies each target // exists in some public/*.html or public/components/*.html. Catches // the class of bug where a component is moved/renamed/deleted and a // JS file keeps calling getElementById('orphan') — the handler then // silently no-ops at runtime. The lightbox that broke for Bedside // pathway images was exactly this: the markup lived in // calculators.html, but after the reorg the bedside tab never loaded // it, so getElementById('img-lightbox') returned null. // // Also checks: // -