feat(js): enforce global lifecycle hard-cuts and helpdesk list adapter

This commit is contained in:
2026-04-20 23:01:54 +02:00
parent c163393cc4
commit c3de7d4238
5 changed files with 171 additions and 38 deletions

View File

@@ -29,6 +29,14 @@ else
ok "No window.alert usage in web/js and modules/*/web/js"
fi
dom_ready_hits="$(rg -n "DOMContentLoaded|document\\.readyState" web/js modules/*/web/js -g '*.js' -g '!**/vendor/**' || true)"
if [[ -n "${dom_ready_hits}" ]]; then
fail "DOM-ready auto-init pattern detected (use lifecycle init(root, config) + runtime wiring):"
echo "${dom_ready_hits}" >&2
else
ok "No DOM-ready auto-init pattern in web/js and modules/*/web/js"
fi
fetch_hits="$(rg -n "\\bfetch\\s*\\(" web/js modules/*/web/js -g '*.js' -g '!web/js/core/app-http.js' -g '!web/js/core/app-telemetry.js' || true)"
if [[ -n "${fetch_hits}" ]]; then
fail "Direct fetch(...) usage detected outside approved HTTP infrastructure:"