mirror of
https://github.com/home-assistant/frontend.git
synced 2026-09-30 16:59:17 +01:00
ESLint cannot judge side-effect imports like `import "../../components/ha-card";`, so dead component registrations accumulate unnoticed. A repo-wide scan matching every side-effect import against the tag its module registers found 308 imports whose element is never referenced anywhere in the importing file. This removes the 84 that carry no registration risk: no other file instantiates the tag without directly importing the defining module (checked for `<tag>`, createElement/dynamicElement/customElements.get/whenDefined, and `custom:<tag>` in Lovelace configs), and every affected module keeps at least one other importer. hui-weather-entity-row got ha-state-icon transitively through the dropped hui-generic-entity-row import, so it now imports ha-state-icon directly, which is the element it actually renders. The gauge gallery page is left alone even though its .ts never names the tag: a gallery page exists to register what its sibling .markdown demos render, and that import is the registration. The remaining 224 are deliberately out of scope. Their component is rendered somewhere else without its own import, so they need the matching import added in the same change. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>