feat: ESLint 정리 및 전체 코드 품질 개선

- eslint.config.mjs 규칙 강화 및 정리
- 전역 unused import/변수 제거 (312개 파일)
- next.config.ts, middleware, proxy route 개선
- CopyableCell molecule 추가
- 회계/결재/HR/생산/건설/품질/영업 등 전 도메인 lint 정리
- IntegratedListTemplateV2, DataTable, MobileCard 등 공통 컴포넌트 개선
- execute-server-action 에러 핸들링 보강
This commit is contained in:
유병철
2026-03-11 10:27:10 +09:00
parent 924726cba1
commit 81affdc441
315 changed files with 1977 additions and 1344 deletions

View File

@@ -25,7 +25,6 @@ import { cn } from '@/lib/utils';
import type { InspectionTemplateData, InspectionTemplateSectionItem } from './types';
import { formatNumber } from '@/lib/utils/amount';
import { getInspectionConfig } from '@/components/production/WorkOrders/actions';
import type { InspectionConfigData } from '@/components/production/WorkOrders/actions';
// 중간검사 공정 타입
export type InspectionProcessType =
@@ -565,7 +564,7 @@ export function InspectionInputModal({
const skipAutoJudgmentRef = useRef(false);
// 절곡용 간격 포인트 초기화 (레거시 — bending_wip 등에서 사용)
const [gapPoints, setGapPoints] = useState<{ left: number | null; right: number | null }[]>(
const [, setGapPoints] = useState<{ left: number | null; right: number | null }[]>(
Array(5).fill(null).map(() => ({ left: null, right: null }))
);

View File

@@ -20,7 +20,6 @@ import { getPresetStyle } from '@/lib/utils/status-config';
import { Button } from '@/components/ui/button';
import {
AlertDialog,
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,

View File

@@ -50,8 +50,8 @@ export const WorkItemCard = memo(function WorkItemCard({
onEditMaterial,
onDeleteMaterial,
onInspectionClick,
inspectionChecked,
onInspectionToggle,
inspectionChecked: _inspectionChecked,
onInspectionToggle: _onInspectionToggle,
}: WorkItemCardProps) {
const [isMaterialListOpen, setIsMaterialListOpen] = useState(false);

View File

@@ -245,10 +245,10 @@ export default function WorkerScreen() {
const [inspectionStepName, setInspectionStepName] = useState<string>('');
// 중간검사 체크 상태 관리: { [itemId]: boolean }
const [inspectionCheckedMap, setInspectionCheckedMap] = useState<Record<string, boolean>>({});
const [inspectionCheckedMap, _setInspectionCheckedMap] = useState<Record<string, boolean>>({});
// 체크된 검사 항목 수 계산
const checkedInspectionCount = useMemo(() => {
const _checkedInspectionCount = useMemo(() => {
return Object.values(inspectionCheckedMap).filter(Boolean).length;
}, [inspectionCheckedMap]);
@@ -270,7 +270,7 @@ export default function WorkerScreen() {
const [editMaterialQty, setEditMaterialQty] = useState('');
// 완료 토스트 상태
const [toastInfo, setToastInfo] = useState<CompletionToastInfo | null>(null);
const [toastInfo, _setToastInfo] = useState<CompletionToastInfo | null>(null);
// 공정 목록 캐시
const [processListCache, setProcessListCache] = useState<Process[]>([]);
@@ -343,7 +343,7 @@ export default function WorkerScreen() {
}
};
loadStepProgress();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedSidebarOrderId]);
// ===== 탭별 필터링된 작업 =====
@@ -705,7 +705,7 @@ export default function WorkerScreen() {
}
};
loadInspectionData();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedSidebarOrderId, workItems.length]);
// ===== 작업지시 변경 시 작업 정보 자동 세팅 =====
@@ -728,7 +728,7 @@ export default function WorkerScreen() {
setProductionManagerId('');
setProductionDate('');
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedSidebarOrderId, filteredWorkOrders, departmentList]);
// ===== 수주 정보 (사이드바 선택 항목 기반) =====
@@ -929,7 +929,7 @@ export default function WorkerScreen() {
try {
const refreshResult = await getMyWorkOrders();
if (refreshResult.success) setWorkOrders(refreshResult.data);
} catch {}
} catch { /* refresh failed silently */ }
} else {
toast.error(result.error || '수정에 실패했습니다.');
}
@@ -969,7 +969,7 @@ export default function WorkerScreen() {
// 로컬 오버라이드 모두 제거 (API 데이터가 최신)
setInputMaterialsMap(new Map());
}
} catch {}
} catch { /* refresh failed silently */ }
} else {
toast.error(result.error || '삭제에 실패했습니다.');
}
@@ -1218,7 +1218,7 @@ export default function WorkerScreen() {
}, [activeProcessTabKey, slatSubMode]);
// 재공품 통합 문서 (작업일지 + 중간검사) 핸들러
const handleWipInspection = useCallback(() => {
const _handleWipInspection = useCallback(() => {
const target = getTargetOrder();
if (target) {
setSelectedOrder(target);