Add analyzer and frontend lint guardrails
This commit is contained in:
@@ -7,7 +7,10 @@ function displayPlayerStatus(player) {
|
||||
if (!player) return "";
|
||||
const phase = player.phase;
|
||||
if (phase === "Suggest") return t("admin.statusSuggesting");
|
||||
if (phase === "Vote") return player.finalized ? t("admin.statusFinished") : t("admin.statusVoting");
|
||||
if (phase === "Vote")
|
||||
return player.finalized
|
||||
? t("admin.statusFinished")
|
||||
: t("admin.statusVoting");
|
||||
if (phase === "Results") return t("admin.statusFinished");
|
||||
return phase;
|
||||
}
|
||||
@@ -59,7 +62,9 @@ export function renderAdminLinker() {
|
||||
|
||||
const previousSource = source.value;
|
||||
const previousTarget = target.value;
|
||||
const options = (state.allSuggestions ?? []).slice().sort((a, b) => a.name.localeCompare(b.name));
|
||||
const options = (state.allSuggestions ?? [])
|
||||
.slice()
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
const fillSelect = (select, placeholderKey) => {
|
||||
select.innerHTML = "";
|
||||
@@ -81,8 +86,10 @@ export function renderAdminLinker() {
|
||||
fillSelect(source, "admin.linkSourcePlaceholder");
|
||||
fillSelect(target, "admin.linkTargetPlaceholder");
|
||||
|
||||
if (previousSource && options.some((s) => String(s.id) === previousSource)) source.value = previousSource;
|
||||
if (previousTarget && options.some((s) => String(s.id) === previousTarget)) target.value = previousTarget;
|
||||
if (previousSource && options.some((s) => String(s.id) === previousSource))
|
||||
source.value = previousSource;
|
||||
if (previousTarget && options.some((s) => String(s.id) === previousTarget))
|
||||
target.value = previousTarget;
|
||||
|
||||
const preventSameSelection = () => {
|
||||
const sourceVal = source.value;
|
||||
|
||||
Reference in New Issue
Block a user