refactor(config): 앱 2개의 동일한 eslint 설정을 next.js로 추출 - #232
Merged
Merged
Conversation
두 앱의 eslint.config.mjs가 같은 내용을 복사해 두고 있어 한쪽만 고쳐도 경고가 없었다. 공용 부분을 packages/config/eslint/next.js로 뽑고 앱은 가져다 쓰기만 한다. eslint-config-next는 설정 파일이 있는 packages/config가 선언하도록 devDependencies를 옮겼다. 추출 전후 두 앱의 lint 출력과 --print-config 결과가 바이트 단위로 같다. Claude-Session: https://claude.ai/code/session_019AdEi4yUNCpfHpyiK6bhT8
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedNext included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 tasks
This branch was successfully deployed
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.
Closes #11
무엇을 / 왜
apps/wholesale·apps/retail의eslint.config.mjs가 같은 내용을 복사해 두고 있었다. 한쪽만 고쳐도 아무 경고가 없고 CI는 각 앱을 자기 설정으로 검사해 둘 다 통과한다. 공용 부분을packages/config/eslint/next.js로 뽑고(기존imports.js패턴) 앱은 그걸 가져다 쓰기만 한다.변경 사항
packages/config/eslint/next.js신설 —core-web-vitals+typescript+imports.js+globalIgnoreseslint.config.mjs→import next from "@ondo/config/eslint/next.js"; export default next;한 줄eslint-config-nextdevDependency를 두 앱에서 빼고packages/config로 옮겼다 — pnpm 격리에서 설정 파일이 있는 워크스페이스가 의존을 선언해야 풀린다.eslint바이너리는 앱에 그대로 둔다packages/ui의 eslint는 건드리지 않았다 (Next 규칙 없음 +@ondo/api금지 규칙이 따로 있어 실제로 다르다)판단한 것
이슈가 열릴 때는 두 파일이 바이트 단위로 같았지만, 그 사이 #218이 도매에만
public/mockServiceWorker.jsignore를 넣어 한 줄이 달라져 있었다. 이 ignore를 공용next.js에 넣었다. 소매엔 그 파일이 없어 무시할 게 없으니 영향이 0이고, 나중에 소매가msw init을 해도 따로 손댈 게 없다. 앱별 예외를 따로 남기면 이 PR의 목적(복사본 없애기)이 반만 된다.검증
pnpm --filter wholesale lint·pnpm --filter retail lint출력이 같다 (둘 다 clean)eslint --print-config(도매src/app/page.tsx, 소매src/app/layout.tsx) 결과가 바이트 단위로 같다 (1629줄 diff 0)public/mockServiceWorker.js는 여전히 ignore된다 (--print-config→undefined)pnpm typecheck && pnpm lint && pnpm build통과남긴 것
https://claude.ai/code/session_019AdEi4yUNCpfHpyiK6bhT8