Private
Public Access
1
0

Fix all frontend ESLint errors
Some checks failed
CI Pipeline / Rust Format Check (push) Successful in 3s
CI Pipeline / Clippy Lints (push) Successful in 45s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 3s
CI Pipeline / Frontend Lint & Type Check (push) Failing after 4s
CI Pipeline / Build .deb & Release (push) Has been skipped

- Add eslint-plugin-react-hooks to package.json and config
- Fix duplicate imports in HostsPage.tsx
- Remove non-null assertion in main.tsx
- Fix != to !== in HostDetailPage.tsx and MaintenanceWindowsPage.tsx
- Fix unused variable in ReportsPage.tsx
- Change console.debug to console.warn in useJobWebSocket.ts
This commit is contained in:
2026-04-27 21:20:25 +00:00
parent adb88fc296
commit 2fd3eb89b4
9 changed files with 18 additions and 14 deletions

View File

@ -64,11 +64,11 @@ function scheduleDescription(w: MaintenanceWindow): string {
case 'daily':
return `Every day at ${time} for ${dur}`
case 'weekly': {
const day = w.recurrence_day != null ? DAY_NAMES[w.recurrence_day] ?? `Day ${w.recurrence_day}` : '?'
const day = w.recurrence_day !== null ? DAY_NAMES[w.recurrence_day] ?? `Day ${w.recurrence_day}` : '?'
return `Every ${day} at ${time} for ${dur}`
}
case 'monthly': {
const day = w.recurrence_day != null ? w.recurrence_day : '?'
const day = w.recurrence_day !== null ? w.recurrence_day : '?'
return `Monthly on day ${day} at ${time} for ${dur}`
}
}

View File

@ -6,8 +6,7 @@ import {
} from '@mui/material'
import { Add as AddIcon, Refresh as RefreshIcon, Delete as DeleteIcon } from '@mui/icons-material'
import { useNavigate } from 'react-router-dom'
import { apiClient } from '../api/client'
import { hostsApi } from '../api/client'
import { apiClient, hostsApi } from '../api/client'
import type { Host, HostHealthStatus } from '../types'
const statusColor = (s: HostHealthStatus) =>

View File

@ -81,11 +81,11 @@ function scheduleDescription(w: MaintenanceWindow): string {
case 'daily':
return `Every day at ${time} for ${dur}`
case 'weekly': {
const day = w.recurrence_day != null ? DAY_NAMES[w.recurrence_day] ?? `Day ${w.recurrence_day}` : '?'
const day = w.recurrence_day !== null ? DAY_NAMES[w.recurrence_day] ?? `Day ${w.recurrence_day}` : '?'
return `Every ${day} at ${time} for ${dur}`
}
case 'monthly': {
const day = w.recurrence_day != null ? w.recurrence_day : '?'
const day = w.recurrence_day !== null ? w.recurrence_day : '?'
return `Monthly on day ${day} at ${time} for ${dur}`
}
}

View File

@ -126,7 +126,7 @@ export default function ReportsPage() {
link.click()
link.remove()
window.URL.revokeObjectURL(url)
} catch (err: unknown) {
} catch (_err: unknown) {
setError('Failed to generate report. Please try again.')
} finally {
setDownloading(false)