From 9979bb41617eb82f22bafd781b5e8d202b4cfed3 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Tue, 25 Mar 2025 10:44:08 +0100 Subject: [PATCH] More linting fixes --- ui/package.json | 4 ++-- ui/src/components/ActionBar.tsx | 9 +++---- ui/src/components/AuthLayout.tsx | 11 ++++----- .../components/extensions/ATXPowerControl.tsx | 12 ++++++---- .../components/extensions/DCPowerControl.tsx | 13 +++++----- .../components/extensions/SerialConsole.tsx | 7 +++--- .../components/popovers/ExtensionPopover.tsx | 19 ++++++++------- ui/src/components/popovers/MountPopover.tsx | 17 ++++++------- ui/src/components/popovers/PasteModal.tsx | 22 +++++++++-------- .../popovers/WakeOnLan/AddDeviceForm.tsx | 12 +++++----- .../popovers/WakeOnLan/DeviceList.tsx | 24 +++++++++---------- .../popovers/WakeOnLan/EmptyStateCard.tsx | 13 +++++----- .../components/popovers/WakeOnLan/Index.tsx | 8 ++++--- ui/src/components/sidebar/connectionStats.tsx | 21 ++++++++-------- ui/src/notifications.tsx | 3 ++- .../devices.$id.settings.access._index.tsx | 23 +++++++++--------- ui/src/utils.ts | 6 ++--- 17 files changed, 115 insertions(+), 109 deletions(-) diff --git a/ui/package.json b/ui/package.json index 128d360..f8f1c7a 100644 --- a/ui/package.json +++ b/ui/package.json @@ -13,8 +13,8 @@ "build:device": "tsc && vite build --mode=device --emptyOutDir", "build:staging": "tsc && vite build --mode=cloud-staging", "build:prod": "tsc && vite build --mode=cloud-production", - "lint": "eslint ./src/**/*.{ts,tsx} --no-error-on-unmatched-pattern", - "lint:fix": "eslint ./src/**/*.{ts,tsx} --no-error-on-unmatched-pattern --fix", + "lint": "eslint './src/**/*.{ts,tsx}'", + "lint:fix": "eslint './src/**/*.{ts,tsx}' --fix", "preview": "vite preview" }, "dependencies": { diff --git a/ui/src/components/ActionBar.tsx b/ui/src/components/ActionBar.tsx index 17d3fc9..1afef63 100644 --- a/ui/src/components/ActionBar.tsx +++ b/ui/src/components/ActionBar.tsx @@ -16,12 +16,9 @@ import Container from "@components/Container"; import { cx } from "@/cva.config"; import PasteModal from "@/components/popovers/PasteModal"; import WakeOnLanModal from "@/components/popovers/WakeOnLan/Index"; - - -import { useDeviceUiNavigation } from "../hooks/useAppNavigation"; - -import MountPopopover from "./popovers/MountPopover"; -import ExtensionPopover from "./popovers/ExtensionPopover"; +import MountPopopover from "@/components/popovers/MountPopover"; +import ExtensionPopover from "@/components/popovers/ExtensionPopover"; +import { useDeviceUiNavigation } from "@/hooks/useAppNavigation"; export default function Actionbar({ requestFullscreen, diff --git a/ui/src/components/AuthLayout.tsx b/ui/src/components/AuthLayout.tsx index 58e1549..b1e9cbc 100644 --- a/ui/src/components/AuthLayout.tsx +++ b/ui/src/components/AuthLayout.tsx @@ -47,8 +47,8 @@ export default function AuthLayout({ } /> -
-
+
+
{showCounter ? (
@@ -62,11 +62,8 @@ export default function AuthLayout({
-
-
+
+ {/*This could be the KVM ID*/} {deviceId ? ( diff --git a/ui/src/components/extensions/ATXPowerControl.tsx b/ui/src/components/extensions/ATXPowerControl.tsx index 62b3bfb..0334a18 100644 --- a/ui/src/components/extensions/ATXPowerControl.tsx +++ b/ui/src/components/extensions/ATXPowerControl.tsx @@ -1,11 +1,13 @@ -import { Button } from "@components/Button"; import { LuHardDrive, LuPower, LuRotateCcw } from "react-icons/lu"; +import { useEffect, useState } from "react"; + +import { Button } from "@components/Button"; import Card from "@components/Card"; import { SettingsPageHeader } from "@components/SettingsPageheader"; -import { useEffect, useState } from "react"; import notifications from "@/notifications"; +import LoadingSpinner from "@/components/LoadingSpinner"; + import { useJsonRpc } from "../../hooks/useJsonRpc"; -import LoadingSpinner from "../LoadingSpinner"; const LONG_PRESS_DURATION = 3000; // 3 seconds for long press @@ -102,11 +104,11 @@ export function ATXPowerControl() { {atxState === null ? ( - + ) : ( -
+
{/* Control Buttons */}