🎨 Lint project

This commit is contained in:
Rune Harlyk
2025-10-11 10:54:07 +02:00
parent 91a7b170fe
commit a77eb0b1e0
36 changed files with 77 additions and 72 deletions
+4 -2
View File
@@ -1,4 +1,6 @@
<script lang="ts">
import type { ComponentType } from 'svelte'
type Variant = 'success' | 'error' | 'primary' | 'info' | 'warning'
const {
@@ -9,12 +11,12 @@
class: klass = '',
children = null
} = $props<{
icon?: any
icon?: ComponentType
title: string
description?: string | number
variant?: Variant
class?: string
children?: () => any
children?: () => ComponentType
}>()
const Icon = $derived(icon)
@@ -24,7 +24,6 @@
jointNames,
currentKinematic,
walkGait,
walkGaits,
walkGaitToMode
} from '$lib/stores'
import {
@@ -11,7 +11,7 @@
let type = $derived(show ? 'text' : 'password')
const handleInput = (e: any) => (value = e.target.value)
const handleInput = (e: Event) => (value = (e.target as HTMLInputElement).value)
const togglePassword = () => (show = !show)
</script>
@@ -3,8 +3,8 @@
min?: number
max?: number
step?: number
value?: any
oninput?: any
value?: number
oninput?: (value: number) => void
}
let {
@@ -2,7 +2,7 @@
import { Github } from '../icons'
interface Props {
github: any
github: { url: string; version: string }
}
let { github }: Props = $props()
+4 -2
View File
@@ -33,9 +33,11 @@
const github = { href: 'https://github.com/' + page.data.github, active: true }
import type { ComponentType } from 'svelte'
type menuItem = {
title: string
icon: ConstructorOfATypedSvelteComponent
icon: ComponentType
href?: string
feature: boolean
active?: boolean
@@ -172,7 +174,7 @@
setActiveMenuItem(page.data.title)
})
const updateMenu = (event: any) => {
const updateMenu = (event: CustomEvent) => {
setActiveMenuItem(event.details)
}
</script>
+4 -2
View File
@@ -1,8 +1,10 @@
<script lang="ts">
import MenuList from './MenuList.svelte'
import type { ComponentType } from 'svelte'
type MenuItem = {
title: string
icon: ConstructorOfATypedSvelteComponent
icon: ComponentType
href?: string
feature: boolean
active?: boolean
@@ -17,7 +19,7 @@
</script>
<ul class={klass + ' menu w-full'}>
{#each menuItems as MenuItem[] as menuItem, i (menuItem.title)}
{#each menuItems as MenuItem[] as menuItem (menuItem.title)}
{#if menuItem.feature}
<li>
{#if menuItem.submenu}
@@ -1,4 +1,4 @@
import { writable, derived, type Writable } from 'svelte/store'
import { writable } from 'svelte/store'
type StateType = 'info' | 'success' | 'warning' | 'error'
@@ -6,12 +6,12 @@
import { slide } from 'svelte/transition'
let chartElement: HTMLCanvasElement
let chart: Chart
let chart: Chart<'line', number[], string>
interface Props {
label: any
label: string
data: number[]
title: any
title: string
}
let { label, data, title }: Props = $props()
@@ -3,7 +3,7 @@
options?: string[]
selectedOption?: string
change?: () => void
[key: string]: any
[key: string]: unknown
}
let { options = [], selectedOption = $bindable(''), ...rest }: Props = $props()