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

@@ -21,7 +21,6 @@ import {
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
import { FileDropzone } from '@/components/ui/file-dropzone';
import { FileList, type ExistingFile } from '@/components/ui/file-list';
@@ -331,7 +330,7 @@ export function ImportInspectionInputModal({
}
})
.finally(() => setIsLoadingTemplate(false));
}, [open, itemId]); // eslint-disable-line react-hooks/exhaustive-deps
}, [open, itemId]);
// ===== Load existing saved data (재검사) =====
const loadExistingData = useCallback(

View File

@@ -129,7 +129,7 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) {
// API 데이터 상태
const [detail, setDetail] = useState<ReceivingDetailType | null>(null);
const [isLoading, setIsLoading] = useState(!isNewMode);
const [isSaving, setIsSaving] = useState(false);
const [, setIsSaving] = useState(false);
const [error, setError] = useState<string | null>(null);
// 폼 데이터 (등록/수정 모드용)

View File

@@ -240,20 +240,20 @@ export function ReceivingList() {
// 테이블 컬럼 (기획서 2026-02-03 순서)
columns: [
{ key: 'no', label: 'No.', className: 'w-[50px] text-center' },
{ key: 'materialNo', label: '입고번호', className: 'w-[130px]' },
{ key: 'lotNo', label: '원자재로트', className: 'w-[120px]' },
{ key: 'materialNo', label: '입고번호', className: 'w-[130px]', copyable: true },
{ key: 'lotNo', label: '원자재로트', className: 'w-[120px]', copyable: true },
{ key: 'inspectionStatus', label: '수입검사', className: 'w-[70px] text-center' },
{ key: 'inspectionDate', label: '검사일', className: 'w-[90px] text-center' },
{ key: 'supplier', label: '발주처', className: 'min-w-[100px]' },
{ key: 'manufacturer', label: '제조사', className: 'min-w-[100px]' },
{ key: 'itemCode', label: '품목코드', className: 'min-w-[100px]' },
{ key: 'inspectionDate', label: '검사일', className: 'w-[90px] text-center', copyable: true },
{ key: 'supplier', label: '발주처', className: 'min-w-[100px]', copyable: true },
{ key: 'manufacturer', label: '제조사', className: 'min-w-[100px]', copyable: true },
{ key: 'itemCode', label: '품목코드', className: 'min-w-[100px]', copyable: true },
{ key: 'itemType', label: '품목유형', className: 'w-[80px] text-center' },
{ key: 'itemName', label: '품목명', className: 'min-w-[130px]' },
{ key: 'specification', label: '규격', className: 'w-[90px]' },
{ key: 'unit', label: '단위', className: 'w-[50px] text-center' },
{ key: 'receivingQty', label: '수량', className: 'w-[60px] text-center' },
{ key: 'receivingDate', label: '입고변경일', className: 'w-[100px] text-center' },
{ key: 'createdBy', label: '작성자', className: 'w-[70px] text-center' },
{ key: 'itemName', label: '품목명', className: 'min-w-[130px]', copyable: true },
{ key: 'specification', label: '규격', className: 'w-[90px]', copyable: true },
{ key: 'unit', label: '단위', className: 'w-[50px] text-center', copyable: true },
{ key: 'receivingQty', label: '수량', className: 'w-[60px] text-center', copyable: true },
{ key: 'receivingDate', label: '입고변경일', className: 'w-[100px] text-center', copyable: true },
{ key: 'createdBy', label: '작성자', className: 'w-[70px] text-center', copyable: true },
{ key: 'status', label: '상태', className: 'w-[80px] text-center' },
],

View File

@@ -1248,7 +1248,7 @@ interface StandardCriteriaObject {
}
// ===== tolerance 객체를 문자열로 변환하는 헬퍼 함수 =====
function formatTolerance(tolerance: unknown): string {
function _formatTolerance(tolerance: unknown): string {
if (!tolerance) return '';
if (typeof tolerance === 'string') return tolerance;
if (typeof tolerance !== 'object') return String(tolerance);

View File

@@ -57,7 +57,7 @@ export function StockAuditModal({
onComplete,
}: StockAuditModalProps) {
const [auditItems, setAuditItems] = useState<AuditItem[]>([]);
const [isLoading, setIsLoading] = useState(false);
const [isLoading, _setIsLoading] = useState(false);
const [isSubmitting, setIsSubmitting] = useState(false);
// 모달이 열릴 때 데이터 초기화

View File

@@ -69,7 +69,7 @@ export function StockStatusDetail({ id }: StockStatusDetailProps) {
});
// 저장 중 상태
const [isSaving, setIsSaving] = useState(false);
const [, setIsSaving] = useState(false);
// API 데이터 로드
const loadData = useCallback(async () => {

View File

@@ -56,7 +56,7 @@ export function StockStatusList() {
// ===== 데이터 상태 (수주관리 패턴) =====
const [stocks, setStocks] = useState<StockItem[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [totalCount, setTotalCount] = useState(0);
const [, setTotalCount] = useState(0);
// ===== 검색 및 필터 상태 =====
const [searchTerm, setSearchTerm] = useState('');
@@ -247,14 +247,14 @@ export function StockStatusList() {
// ===== 테이블 컬럼 =====
const tableColumns = useMemo(() => [
{ key: 'no', label: 'No.', className: 'w-[60px] text-center' },
{ key: 'itemCode', label: '품목코드', className: 'min-w-[100px]' },
{ key: 'itemCode', label: '품목코드', className: 'min-w-[100px]', copyable: true },
{ key: 'itemType', label: '품목유형', className: 'w-[80px]' },
{ key: 'itemName', label: '품목명', className: 'min-w-[150px]' },
{ key: 'specification', label: '규격', className: 'w-[100px]' },
{ key: 'unit', label: '단위', className: 'w-[60px] text-center' },
{ key: 'calculatedQty', label: '재고량', className: 'w-[80px] text-center' },
{ key: 'safetyStock', label: '안전재고', className: 'w-[80px] text-center' },
{ key: 'wipQty', label: '재공품', className: 'w-[80px] text-center' },
{ key: 'itemName', label: '품목명', className: 'min-w-[150px]', copyable: true },
{ key: 'specification', label: '규격', className: 'w-[100px]', copyable: true },
{ key: 'unit', label: '단위', className: 'w-[60px] text-center', copyable: true },
{ key: 'calculatedQty', label: '재고량', className: 'w-[80px] text-center', copyable: true },
{ key: 'safetyStock', label: '안전재고', className: 'w-[80px] text-center', copyable: true },
{ key: 'wipQty', label: '재공품', className: 'w-[80px] text-center', copyable: true },
{ key: 'useStatus', label: '상태', className: 'w-[80px] text-center' },
], []);