From a70133e6868bb1d8e4103a99ae018b38945c099e Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 20 May 2024 08:52:54 -0600 Subject: [PATCH] Fix eslint issues --- .../mods/AppMiscStarblastMods.svelte | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/misc/starblast/mods/AppMiscStarblastMods.svelte b/scripts/misc/starblast/mods/AppMiscStarblastMods.svelte index 540c0035..85751906 100644 --- a/scripts/misc/starblast/mods/AppMiscStarblastMods.svelte +++ b/scripts/misc/starblast/mods/AppMiscStarblastMods.svelte @@ -4,8 +4,8 @@ import * as d3 from 'd3' import { onMount } from 'svelte' import { pStore } from '@/util/svelte' -import { ModData, ModInfo } from './modinfo' -import { formatDelay, generateHistory, ModEvent } from './history' +import { type ModData, type ModInfo } from './modinfo' +import { formatDelay, generateHistory, type ModEvent } from './history' import { formatTime, generateData } from './data' import modsinfo from './modsinfo.json' @@ -105,7 +105,7 @@ function render (): void { if ($showDaily && $showDailyTime) { const [dStart, dEnd] = xScale.domain().map(Number) if (dEnd - dStart <= 6912e7) { // 800 days - let t = new Date(dStart - (24 + 2)*60*60*1000) // assuming DST shifts up to a maximum of 2 hours + const t = new Date(dStart - (24 + 2) * 60 * 60 * 1000) // assuming DST shifts up to a maximum of 2 hours const [h, m] = $showDailyTime.split(':').map(Number) t.setHours(h) t.setMinutes(m) @@ -178,7 +178,7 @@ function resizeHandler (): void { viz .attr('width', width) - .attr('height', height) + .attr('height', height) xAxis .attr('transform', 'translate(0, ' + height + ')') @@ -205,7 +205,7 @@ function resizeHandler (): void { render() } -function init () { +function init (): void { const chart = d3.select(chartNode) viz = chart.append('svg') @@ -229,7 +229,7 @@ function init () { resizeHandler() } -function setModEvent (m: ModEvent) { +function setModEvent (m: ModEvent): void { modEvent = m const total = modEvent.infoActiveHours @@ -268,7 +268,7 @@ function setModEvent (m: ModEvent) { } } -async function loadInfo () { +async function loadInfo (): Promise { loading = true try { const resp = await fetch('https://starblast.io/modsinfo.json') @@ -342,8 +342,8 @@ onMount(async function () {
Info Source - - + +
@@ -411,7 +411,7 @@ onMount(async function () { {h.mod?.mod_id ?? ''} {:else} @@ -444,7 +444,7 @@ onMount(async function () { {title} {mod_id} - {#if typeof timings == 'string'} + {#if typeof timings === 'string'} {timings} {:else} {#each timings as t, i}