chore: resolve lint warnings with targeted type and rule fixes

This commit is contained in:
2026-02-28 11:59:30 +01:00
parent 1a88efc46b
commit 612a70ffbe
35 changed files with 107 additions and 63 deletions

View File

@@ -9,6 +9,10 @@ interface BeforeInstallPromptEvent extends Event {
userChoice: Promise<{ outcome: "accepted" | "dismissed" }>;
}
interface NavigatorStandalone extends Navigator {
standalone?: boolean;
}
const DISMISS_KEY = "pwa-install-dismissed";
const DISMISS_DURATION = 7 * 24 * 60 * 60 * 1000; // 7 jours en millisecondes
@@ -24,7 +28,7 @@ export function InstallPWA() {
const checkStandalone = () => {
return (
window.matchMedia("(display-mode: standalone)").matches ||
(window.navigator as any).standalone ||
(window.navigator as NavigatorStandalone).standalone ||
document.referrer.includes("android-app://")
);
};

View File

@@ -15,7 +15,10 @@ import { useBookOfflineStatus } from "@/hooks/useBookOfflineStatus";
import { WifiOff } from "lucide-react";
// Fonction utilitaire pour obtenir les informations de statut de lecture
const getReadingStatusInfo = (book: KomgaBook, t: (key: string, options?: any) => string) => {
const getReadingStatusInfo = (
book: KomgaBook,
t: (key: string, options?: { [key: string]: string | number }) => string
) => {
if (!book.readProgress) {
return {
label: t("books.status.unread"),

View File

@@ -1,7 +1,7 @@
import * as React from "react";
import { cn } from "@/lib/utils";
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {

View File

@@ -9,7 +9,7 @@ interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
onValueChange?: (value: string) => void;
}
interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {}
type TabsListProps = React.HTMLAttributes<HTMLDivElement>;
interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
value: string;