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

@@ -8,17 +8,17 @@
* @param wait Time in milliseconds to wait before calling the function
* @returns Debounced function
*/
export function debounce<T extends (...args: any[]) => any>(
export function debounce<T extends (..._args: unknown[]) => unknown>(
func: T,
wait: number
): (...args: Parameters<T>) => void {
): (..._args: Parameters<T>) => void {
let timeout: ReturnType<typeof setTimeout> | null = null
return function (...args: Parameters<T>): void {
return function (..._args: Parameters<T>): void {
if (timeout) {
clearTimeout(timeout)
}
timeout = setTimeout(() => func(...args), wait)
timeout = setTimeout(() => func(..._args), wait)
}
}
@@ -128,7 +128,7 @@ export function deepClone<T>(obj: T): T {
* @param value Value to check
* @returns True if value is empty
*/
export function isEmpty(value: any): boolean {
export function isEmpty(value: unknown): boolean {
if (value === null || value === undefined) return true
if (typeof value === 'string' && value.trim() === '') return true
if (Array.isArray(value) && value.length === 0) return true