fix(lint): remove unused vars in refactored generators

- Fix 11 lint errors introduced during refactoring
- All remaining 16 errors are pre-existing in unrefactored files
This commit is contained in:
emil
2026-05-13 20:59:01 +03:00
parent 0081510914
commit 8a0e2b5e0f
15 changed files with 160 additions and 30 deletions
@@ -96,9 +96,8 @@ const T = useT(isRu ? "ru" : "en");
<script>
import { randomInt } from "@/lib/client/random";
import { getClientT } from "@/lib/client/i18n";
const T = getClientT();
const swatch = document.getElementById("cg-swatch") as HTMLDivElement;
const valuesEl = document.getElementById("cg-values") as HTMLDivElement;
const hexEl = document.getElementById("cg-hex") as HTMLSpanElement;
@@ -114,11 +114,10 @@ const T = useT(isRu ? "ru" : "en");
import { createErrorDisplay } from "@/lib/client/validation";
import { popElement } from "@/lib/client/animations";
import { randomFloat } from "@/lib/client/random";
import { getClientLang, getClientT } from "@/lib/client/i18n";
import { getClientLang } from "@/lib/client/i18n";
const lang = getClientLang();
const isRu = lang === "ru";
const T = getClientT();
const lang = getClientLang();
const isRu = lang === "ru";
const ERR_BOTH_DATES = isRu
? "Укажите обе даты."
: "Please enter both dates.";
@@ -114,10 +114,9 @@ const i18n = {
<script>
import { randomInt } from "@/lib/client/random";
import { getClientLang, getClientT } from "@/lib/client/i18n";
import { getClientT } from "@/lib/client/i18n";
const lang = getClientLang();
const T = getClientT();
const T = getClientT();
const typeSelect = document.getElementById("gg-type") as HTMLSelectElement;
const stopsSelect = document.getElementById("gg-stops") as HTMLSelectElement;
@@ -1,7 +1,5 @@
---
import { useT } from "../../i18n/translations";
const isRu = Astro.url.pathname.startsWith("/ru");
const T = useT(isRu ? "ru" : "en");
---
<div id="hash-generator" class="mt-8">
@@ -80,11 +80,10 @@ const T = useT(isRu ? "ru" : "en");
import { CopyFeedback } from "@/lib/client/clipboard";
import { popElement } from "@/lib/client/animations";
import { randomInt } from "@/lib/client/random";
import { getClientLang, getClientT } from "@/lib/client/i18n";
import { getClientLang } from "@/lib/client/i18n";
const lang = getClientLang();
const isRu = lang === "ru";
const T = getClientT();
const lang = getClientLang();
const isRu = lang === "ru";
const ALPHABET = isRu
? "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"
: "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -139,7 +139,7 @@ const startLabel = isRu
<script>
import { randomInt, shuffleArray } from "@/lib/client/random";
import { getClientLang, getClientT } from "@/lib/client/i18n";
import { getClientT } from "@/lib/client/i18n";
const WORDS = [
"lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit",
"sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore",
@@ -1,7 +1,5 @@
---
import { useT } from "../../i18n/translations";
const isRu = Astro.url.pathname.startsWith("/ru");
const T = useT(isRu ? "ru" : "en");
const askPlaceholder = isRu
? "Задайте вопрос с ответом да/нет..."
@@ -119,7 +119,7 @@ const genderOptions = [
import { CopyFeedback } from "@/lib/client/clipboard";
import { popElement } from "@/lib/client/animations";
import { randomInt } from "@/lib/client/random";
import { getClientLang, getClientT } from "@/lib/client/i18n";
import { getClientLang } from "@/lib/client/i18n";
const isRu = getClientLang() === "ru";
@@ -1,7 +1,5 @@
---
import { useT } from "../../i18n/translations";
const isRu = Astro.url.pathname.startsWith("/ru");
const T = useT(isRu ? "ru" : "en");
---
<div id="rps-generator" class="mt-8" data-ru={isRu ? "1" : "0"}>
@@ -175,11 +175,10 @@ const T = useT(isRu ? "ru" : "en");
import { createErrorDisplay } from "@/lib/client/validation";
import { popElement } from "@/lib/client/animations";
import { randomInt } from "@/lib/client/random";
import { getClientLang, getClientT } from "@/lib/client/i18n";
import { getClientLang } from "@/lib/client/i18n";
const lang = getClientLang();
const isRu = lang === "ru";
const T = getClientT();
const lang = getClientLang();
const isRu = lang === "ru";
const ERR_FROM_BEFORE_TO = isRu
? "«От» должно быть раньше «До»."
@@ -112,10 +112,9 @@ const confidenceLabel = isRu ? "Уверенность" : "Confidence";
import { CopyFeedback } from "@/lib/client/clipboard";
import { popElement } from "@/lib/client/animations";
import { randomInt } from "@/lib/client/random";
import { getClientLang, getClientT } from "@/lib/client/i18n";
import { getClientLang } from "@/lib/client/i18n";
const isRu = getClientLang() === "ru";
const T = getClientT();
const isRu = getClientLang() === "ru";
const ANSWERS = isRu
? ["ДА", "НЕТ", "ВОЗМОЖНО"]
: ["YES", "NO", "MAYBE"];