fix(ci): resolve all lint errors for GitHub Actions
- Remove unused SupportedLocale import in results.tsx - Remove unused webroot variable in public/i18n.js - Configure knip.json to ignore i18n public API exports - Add language-selector and language-option to ESLint ignore list - Auto-fix Prettier formatting across all files - Fix better-tailwindcss line wrapping issues
This commit is contained in:
parent
8089fa0853
commit
569c572e62
16 changed files with 621 additions and 508 deletions
|
|
@ -24,9 +24,7 @@ export const BaseHtml = ({
|
|||
<link rel="icon" type="image/png" sizes="32x32" href={`${webroot}/favicon-32x32.png`} />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href={`${webroot}/favicon-16x16.png`} />
|
||||
<link rel="manifest" href={`${webroot}/site.webmanifest`} />
|
||||
<script>
|
||||
{`window.__TRANSLATIONS__ = ${JSON.stringify(getTranslations(locale))};`}
|
||||
</script>
|
||||
<script>{`window.__TRANSLATIONS__ = ${JSON.stringify(getTranslations(locale))};`}</script>
|
||||
<script src={`${webroot}/i18n.js`} defer />
|
||||
</head>
|
||||
<body class={`flex min-h-screen w-full flex-col bg-neutral-900 text-neutral-200`}>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
import { type SupportedLocale, type Translator, createTranslator, defaultLocale } from "../i18n/index";
|
||||
import {
|
||||
type SupportedLocale,
|
||||
type Translator,
|
||||
createTranslator,
|
||||
defaultLocale,
|
||||
} from "../i18n/index";
|
||||
import { LanguageSelector } from "./languageSelector";
|
||||
|
||||
export const Header = ({
|
||||
|
|
|
|||
|
|
@ -36,7 +36,14 @@ export const LanguageSelector = ({
|
|||
d="M10.5 21l5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 016-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 01-3.827-5.802"
|
||||
/>
|
||||
</svg>
|
||||
<span class="hidden sm:inline">{t("nav", "language")}</span>
|
||||
<span
|
||||
class={`
|
||||
hidden
|
||||
sm:inline
|
||||
`}
|
||||
>
|
||||
{t("nav", "language")}
|
||||
</span>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
|
|
@ -51,8 +58,8 @@ export const LanguageSelector = ({
|
|||
<ul
|
||||
id="language-dropdown"
|
||||
class={`
|
||||
absolute right-0 top-full z-50 mt-2 hidden min-w-[160px] max-h-[320px] flex-col overflow-y-auto rounded
|
||||
border border-neutral-700 bg-neutral-800 shadow-lg
|
||||
absolute top-full right-0 z-50 mt-2 hidden max-h-[320px] min-w-[160px] flex-col
|
||||
overflow-y-auto rounded border border-neutral-700 bg-neutral-800 shadow-lg
|
||||
`}
|
||||
role="menu"
|
||||
>
|
||||
|
|
@ -65,7 +72,11 @@ export const LanguageSelector = ({
|
|||
language-option flex w-full items-center gap-2 px-4 py-2 text-left text-sm
|
||||
transition-colors
|
||||
hover:bg-neutral-700
|
||||
${locale.code === currentLocale ? "bg-neutral-700 text-accent-500" : "text-neutral-200"}
|
||||
${
|
||||
locale.code === currentLocale
|
||||
? "bg-neutral-700 text-accent-500"
|
||||
: `text-neutral-200`
|
||||
}
|
||||
`}
|
||||
data-locale={locale.code}
|
||||
data-webroot={webroot}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue