fix: 새 ESLint 규칙 대응 + @eslint/js 10 · react-hooks 7 업그레이드 - #308
Merged
Conversation
WorkInboxTargetList.tsx의 nextIndex 초기값이 모든 분기에서 재대입되거나 return으로 빠져나가 실제로 쓰이지 않던 것을 no-useless-assignment 규칙이 잡음
eslint-plugin-react-hooks v6+ recommended는 React Compiler 전제 규칙(set-state-in-effect, refs, preserve-manual-memoization 등 14개)을 대거 포함하는데, 이 프로젝트는 React Compiler를 쓰지 않고 useApiQuery 등 fetch-then-setState 패턴을 전역에서 쓰고 있어서 그대로 켜면 10개 파일에서 오탐(false positive)이 남. rules-of-hooks/exhaustive-deps 두 개만 명시적으로 켜서 기존 동작은 유지하면서 새 버전으로 업그레이드. resolves dependabot #303, #307
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dependabot #303, #307 대응
배경
@eslint/js9→10): 새no-useless-assignment규칙이WorkInboxTargetList.tsx의 기존 코드 잡음eslint-plugin-react-hooks5→7): v6+ recommended가 React Compiler 전제 규칙(set-state-in-effect/refs/preserve-manual-memoization등)을 대거 포함 — 이 프로젝트는 React Compiler 미사용이라useApiQuery등 fetch-then-setState 패턴을 쓰는 10개 파일에서 오탐 발생변경 사항
WorkInboxTargetList.tsx: 모든 분기에서 재대입되거나 return으로 빠지는nextIndex초기 대입 제거eslint.config.js: react-hooks recommended 전체 spread 대신rules-of-hooks(error)/exhaustive-deps(warn) 두 개만 명시적으로 켬 — 기존 동작 유지@eslint/js10.0.1,eslint-plugin-react-hooks7.1.1로 업그레이드검증
bunx tsc -b통과bun run lint— 0 errors (기존 13개 react-refresh 경고만 유지)bun run test— 438 tests 전부 통과 (병렬 실행 중 SignupPage 1개 타임아웃 플레이크 있었으나 단독 실행 시 통과 확인)bun run build통과머지 후 dependabot #303/#307은 닫습니다.