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

@@ -57,7 +57,6 @@ const FIELD_NAME_MAP: Record<string, string> = {
import type {
PricingData,
PricingFormData,
ItemInfo,
RoundingRule,
ItemType,
@@ -192,7 +191,7 @@ export function PricingFormClient({
setSalesPrice(finalPrice);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [purchasePrice, processingCost, loss, roundingRule, roundingUnit]);
// 마진 금액 계산

View File

@@ -13,7 +13,7 @@ import {
} from '@/components/ui/dialog';
import { Badge } from '@/components/ui/badge';
import { getPresetStyle } from '@/lib/utils/status-config';
import { Separator } from '@/components/ui/separator';
// Separator removed - unused
import { History } from 'lucide-react';
import { formatNumber } from '@/lib/utils/amount';
import type { PricingData } from './types';

View File

@@ -63,7 +63,7 @@ export function PricingListClient({
};
// 탭별 데이터 수 계산 (통계용)
const filteredData = useMemo(() => {
const _filteredData = useMemo(() => {
let result = [...data];
// 탭 필터
@@ -174,7 +174,7 @@ export function PricingListClient({
router.push(`/sales/pricing-management/${item.id}?mode=edit`);
};
const handleHistory = (item: PricingListItem) => {
const _handleHistory = (_item: PricingListItem) => {
// TODO: 이력 다이얼로그 열기
};
@@ -200,15 +200,15 @@ export function PricingListClient({
const tableColumns: TableColumn[] = useMemo(() => [
{ key: 'rowNumber', label: '번호', className: 'w-[60px] text-center' },
{ key: 'itemType', label: '품목유형', className: 'min-w-[100px]' },
{ key: 'itemCode', label: '품목코드', className: 'min-w-[120px]' },
{ key: 'itemName', label: '품목명', className: 'min-w-[150px]' },
{ key: 'specification', label: '규격', className: 'min-w-[100px]', hideOnMobile: true },
{ key: 'unit', label: '단위', className: 'min-w-[60px]', hideOnMobile: true },
{ key: 'purchasePrice', label: '매입단가', className: 'min-w-[100px] text-right', hideOnTablet: true },
{ key: 'processingCost', label: '가공비', className: 'min-w-[80px] text-right', hideOnTablet: true },
{ key: 'salesPrice', label: '판매단가', className: 'min-w-[100px] text-right' },
{ key: 'marginRate', label: '마진율', className: 'min-w-[80px] text-right', hideOnMobile: true },
{ key: 'effectiveDate', label: '적용일', className: 'min-w-[100px]', hideOnMobile: true },
{ key: 'itemCode', label: '품목코드', className: 'min-w-[120px]', copyable: true },
{ key: 'itemName', label: '품목명', className: 'min-w-[150px]', copyable: true },
{ key: 'specification', label: '규격', className: 'min-w-[100px]', hideOnMobile: true, copyable: true },
{ key: 'unit', label: '단위', className: 'min-w-[60px]', hideOnMobile: true, copyable: true },
{ key: 'purchasePrice', label: '매입단가', className: 'min-w-[100px] text-right', hideOnTablet: true, copyable: true },
{ key: 'processingCost', label: '가공비', className: 'min-w-[80px] text-right', hideOnTablet: true, copyable: true },
{ key: 'salesPrice', label: '판매단가', className: 'min-w-[100px] text-right', copyable: true },
{ key: 'marginRate', label: '마진율', className: 'min-w-[80px] text-right', hideOnMobile: true, copyable: true },
{ key: 'effectiveDate', label: '적용일', className: 'min-w-[100px]', hideOnMobile: true, copyable: true },
{ key: 'status', label: '상태', className: 'min-w-[80px]' },
], []);

View File

@@ -18,7 +18,7 @@ import { executeServerAction } from '@/lib/api/execute-server-action';
import type { PricingData, ItemInfo } from './types';
// API 응답 타입
interface ApiResponse<T> {
interface _ApiResponse<T> {
success: boolean;
data: T;
message: string;

View File

@@ -2,7 +2,6 @@
* 단가관리 타입 정의
*/
import type { LucideIcon } from 'lucide-react';
// ===== 단가 리비전 =====