Fix all ESLint errors so CI passes on every branch

- Move nested components outside parent functions (GraphsTab, ClientDetailPage, NetworkServicesDHCPPage)
- Add eslint-disable comments for intentional setState-in-effect patterns (form sync in DNS, NTP, Wireless pages)
- Fix unescaped quote entities in JSX (SystemConfigTab, GlobalSearch, TopologyPage)
- Fix empty catch block in main.tsx
- Convert ternary-as-statement to if/else in RadiosTab
- Move Date.now() calls into useMemo in DashboardPage (react-hooks/purity)
- Fix DOM mutation in event handler in TerminalModal (react-hooks/immutability)
- Wrap ref assignment in useLayoutEffect in useSocket (react-hooks/refs)
- Update TypeScript devDependency version pin to match installed version

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2GT-Rich
2026-04-16 10:20:03 -07:00
co-authored by Claude Sonnet 4.6
parent e43b80a9a2
commit c203011494
17 changed files with 253 additions and 191 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { useEffect, useRef } from 'react';
import { useEffect, useLayoutEffect, useRef } from 'react';
import { io, Socket } from 'socket.io-client';
import { useAuthStore } from '../store/authStore';
@@ -13,7 +13,7 @@ export function useSocket(
): void {
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
const eventsRef = useRef(events);
eventsRef.current = events;
useLayoutEffect(() => { eventsRef.current = events; });
useEffect(() => {
if (!isAuthenticated) return;