Lint frontend
Some checks failed
pipeline / lint-and-format (push) Failing after 4m18s
pipeline / build-and-push-images (push) Has been skipped

This commit is contained in:
2026-01-21 23:39:03 +01:00
parent f307e3a8fc
commit 3d79d9e495
21 changed files with 356 additions and 183 deletions

View File

@@ -32,8 +32,8 @@ const champions = computed(() => {
return championsData.value
.slice(1)
.filter((champion: any) => !champion.name.includes('Doom Bot'))
.sort((a: any, b: any) => a.name.localeCompare(b.name))
.filter((champion: ChampionSummary) => !champion.name.includes('Doom Bot'))
.sort((a: ChampionSummary, b: ChampionSummary) => a.name.localeCompare(b.name))
})
const lanesMap = computed(() => {
@@ -64,7 +64,7 @@ function filterChampionsByLane(laneFilter: number): void {
}
const laneName = filterToLane(laneFilter)
filteredChampions.value = champions.value.filter((champion: any) => {
filteredChampions.value = champions.value.filter((champion: ChampionSummary) => {
const championLanes = lanesMap.value.get(champion.alias.toLowerCase())
if (!championLanes) return false
@@ -77,14 +77,14 @@ const debouncedSearch = debounce((searchTerm: string) => {
if (isEmpty(searchTerm)) {
filteredChampions.value = [...champions.value]
} else {
filteredChampions.value = champions.value.filter((champion: any) =>
filteredChampions.value = champions.value.filter((champion: ChampionSummary) =>
champion.name.toLowerCase().includes(searchTerm.toLowerCase())
)
}
}, 300)
// Watchers
watch(searchBar, (newS, oldS) => {
watch(searchBar, (_newS, _oldS) => {
searchBar.value?.focus()
})
@@ -124,7 +124,7 @@ const isLoading = computed(() => loadingChampions.value || loadingLanes.value)
<div>
<!-- Loading state -->
<div v-if="isLoading" class="loading-state">
<div class="loading-spinner"/>
<div class="loading-spinner" />
<p>Loading champions...</p>
</div>
@@ -146,7 +146,7 @@ const isLoading = computed(() => loadingChampions.value || loadingLanes.value)
@keyup.enter="
() => filteredChampions.length > 0 && navigateToChampion(filteredChampions[0].alias)
"
>
/>
</div>
<!-- Empty state -->