Autofix eslint issues

This commit is contained in:
2025-07-26 23:10:07 +02:00
parent 90069ca7a0
commit 06160cc61e
17 changed files with 24 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
// ui/src/components/HealthBadge.tsx
import React from "react";
import { Badge } from "@/components/ui/badge";
import { HealthStatus } from "@/types/instance";
import type { HealthStatus } from "@/types/instance";
import { CheckCircle, Loader2, XCircle } from "lucide-react";
interface HealthBadgeProps {

View File

@@ -1,7 +1,7 @@
// ui/src/components/InstanceCard.tsx
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Instance } from "@/types/instance";
import type { Instance } from "@/types/instance";
import { Edit, FileText, Play, Square, Trash2 } from "lucide-react";
import LogsModal from "@/components/LogModal";
import HealthBadge from "@/components/HealthBadge";

View File

@@ -1,7 +1,7 @@
// ui/src/components/InstanceList.tsx
import { useInstances } from '@/contexts/InstancesContext'
import InstanceCard from '@/components/InstanceCard'
import { Instance } from '@/types/instance'
import type { Instance } from '@/types/instance'
import { memo } from 'react'
interface InstanceListProps {

View File

@@ -10,7 +10,7 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { CreateInstanceOptions, Instance } from "@/types/instance";
import type { CreateInstanceOptions, Instance } from "@/types/instance";
import { getBasicFields, getAdvancedFields } from "@/lib/zodFormUtils";
import { ChevronDown, ChevronRight } from "lucide-react";
import ZodFormField from "@/components/ZodFormField";

View File

@@ -2,7 +2,7 @@ import React from 'react'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { Checkbox } from '@/components/ui/checkbox'
import { CreateInstanceOptions } from '@/types/instance'
import type { CreateInstanceOptions } from '@/types/instance'
import { getFieldType, basicFieldsConfig } from '@/lib/zodFormUtils'
interface ZodFormFieldProps {

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import InstanceCard from '@/components/InstanceCard'
import { Instance } from '@/types/instance'
import type { Instance } from '@/types/instance'
// Mock the health hook since we're not testing health logic here
vi.mock('@/hooks/useInstanceHealth', () => ({

View File

@@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'
import InstanceList from '@/components/InstanceList'
import { InstancesProvider } from '@/contexts/InstancesContext'
import { instancesApi } from '@/lib/api'
import { Instance } from '@/types/instance'
import type { Instance } from '@/types/instance'
// Mock the API
vi.mock('@/lib/api', () => ({

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'
import { render, screen, waitFor } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import InstanceModal from '@/components/InstanceModal'
import { Instance } from '@/types/instance'
import type { Instance } from '@/types/instance'
describe('InstanceModal - Form Logic and Validation', () => {
const mockOnSave = vi.fn()
@@ -136,7 +136,7 @@ describe('InstanceModal - Form Logic and Validation', () => {
}
}
it('pre-fills form with existing instance data', async () => {
it('pre-fills form with existing instance data', () => {
render(
<InstanceModal
open={true}
@@ -177,7 +177,7 @@ describe('InstanceModal - Form Logic and Validation', () => {
})
})
it('shows correct button text for running vs stopped instances', async () => {
it('shows correct button text for running vs stopped instances', () => {
const runningInstance: Instance = { ...mockInstance, running: true }
const { rerender } = render(
@@ -205,7 +205,7 @@ describe('InstanceModal - Form Logic and Validation', () => {
})
describe('Auto Restart Configuration', () => {
it('shows restart options when auto restart is enabled', async () => {
it('shows restart options when auto restart is enabled', () => {
render(
<InstanceModal
open={true}