Add analyzer and frontend lint guardrails
This commit is contained in:
@@ -74,7 +74,8 @@ export function renderVotes() {
|
||||
const warn = $("warn-" + suggestionId);
|
||||
const fallbackValue = prevScore ?? 5;
|
||||
const fallbackDisplay = prevScore ?? "—";
|
||||
const fallbackEmoji = prevScore != null ? scoreToEmoji(prevScore) : "⚠️";
|
||||
const fallbackEmoji =
|
||||
prevScore != null ? scoreToEmoji(prevScore) : "⚠️";
|
||||
e.target.value = fallbackValue;
|
||||
if (label) label.textContent = fallbackDisplay;
|
||||
if (emoji) emoji.textContent = fallbackEmoji;
|
||||
@@ -89,7 +90,9 @@ export function renderVotes() {
|
||||
linkedIds.forEach((id) => {
|
||||
const peerWarn = $("warn-" + id);
|
||||
if (peerWarn) peerWarn.classList.add("hidden");
|
||||
const peerSlider = document.querySelector(`input[type=range][data-id="${id}"]`);
|
||||
const peerSlider = document.querySelector(
|
||||
`input[type=range][data-id="${id}"]`,
|
||||
);
|
||||
if (peerSlider) delete peerSlider.dataset.pending;
|
||||
});
|
||||
await getUiRuntime().loadVoteData();
|
||||
@@ -174,7 +177,9 @@ function syncLinkedSliders(sourceEl, value) {
|
||||
if (!linkedAttr) return;
|
||||
const ids = linkedAttr.split(",").filter(Boolean);
|
||||
ids.forEach((id) => {
|
||||
const slider = document.querySelector(`input[type=range][data-id="${id}"]`);
|
||||
const slider = document.querySelector(
|
||||
`input[type=range][data-id="${id}"]`,
|
||||
);
|
||||
if (!slider || slider === sourceEl) return;
|
||||
slider.value = value;
|
||||
const scoreLabel = $("score-" + id);
|
||||
@@ -206,7 +211,9 @@ export function updatePhaseNav() {
|
||||
|
||||
const finalizeBtn = $("finalize-votes");
|
||||
if (finalizeBtn) {
|
||||
finalizeBtn.textContent = state.votesFinal ? t("vote.unfinalize") : t("vote.finalize");
|
||||
finalizeBtn.textContent = state.votesFinal
|
||||
? t("vote.unfinalize")
|
||||
: t("vote.finalize");
|
||||
}
|
||||
|
||||
const voteMissingBadge = $("vote-missing");
|
||||
@@ -226,7 +233,9 @@ export function updatePhaseNav() {
|
||||
|
||||
const voteStatusText = $("vote-status-text");
|
||||
if (voteStatusText) {
|
||||
voteStatusText.textContent = state.votesFinal ? t("nav.voteFinalized") : t("nav.voteHint");
|
||||
voteStatusText.textContent = state.votesFinal
|
||||
? t("nav.voteFinalized")
|
||||
: t("nav.voteHint");
|
||||
}
|
||||
|
||||
renderAdminVoteStatus();
|
||||
@@ -243,7 +252,9 @@ export function updatePhaseNav() {
|
||||
if (voteNext) {
|
||||
const locked = !state.resultsOpen && !isAdmin;
|
||||
voteNext.disabled = locked;
|
||||
voteNext.textContent = locked ? t("nav.waitingForResults") : t("nav.next");
|
||||
voteNext.textContent = locked
|
||||
? t("nav.waitingForResults")
|
||||
: t("nav.next");
|
||||
}
|
||||
|
||||
const adminResultsToggle = $("results-open");
|
||||
|
||||
Reference in New Issue
Block a user