Skip to content

refactor(config): 앱 2개의 동일한 eslint 설정을 next.js로 추출 - #232

Merged
OhChangEun merged 1 commit into
devfrom
refactor-11-shared-eslint-next
Sep 10, 2026
Merged

OhChangEun merged 1 commit into
devfrom
refactor-11-shared-eslint-next

Conversation

@OhChangEun

Copy link
Copy Markdown
Contributor

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 + globalIgnores
  • 두 앱 eslint.config.mjs → import next from "@ondo/config/eslint/next.js"; export default next; 한 줄
  • eslint-config-next devDependency를 두 앱에서 빼고 packages/config로 옮겼다 — pnpm 격리에서 설정 파일이 있는 워크스페이스가 의존을 선언해야 풀린다. eslint 바이너리는 앱에 그대로 둔다
  • packages/ui의 eslint는 건드리지 않았다 (Next 규칙 없음 + @ondo/api 금지 규칙이 따로 있어 실제로 다르다)

판단한 것

이슈가 열릴 때는 두 파일이 바이트 단위로 같았지만, 그 사이 #218이 도매에만 public/mockServiceWorker.js ignore를 넣어 한 줄이 달라져 있었다. 이 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

두 앱의 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
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ondo-retail Building Building Preview Sep 10, 2026 11:48am UTC
ondo-wholesale Building Building Preview Sep 10, 2026 11:48am UTC

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: fa1c6e9e-2d6a-4f14-bc9a-eb96618db754

📥 Commits

Reviewing files that changed from the base of the PR and between bb23f09 and 1595ede.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • apps/retail/eslint.config.mjs
  • apps/retail/package.json
  • apps/wholesale/eslint.config.mjs
  • apps/wholesale/package.json
  • packages/config/eslint/next.js
  • packages/config/package.json

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

2 active deployments
Preview – ondo-wholesale — 1595edec Deployed Sep 10, 2026 by vercel[bot]
Preview – ondo-retail — 1595edec Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(config): 앱 2개의 동일한 eslint 설정을 packages/config로 추출

1 participant