Skip to content

oxlint-config 룰 확장 #164

Description

@yujeong-jeon

배경

@naverpay/oxlint-config@0.0.1은 core 5룰 + @typescript-eslint 12룰 = 17룰만 커버해,
현행 @naverpay/eslint-config 룰셋을 대체할 수 없습니다. 그래서 card-apply-web은
.oxlintrc.json(184룰) + 로컬 jsPlugin을 직접 구성했습니다.
아래 항목을 패키지에 보강하면 각 레포의 직접 구성을 걷어낼 수 있습니다.

참고: card-apply-web PR #1166 (직접 구성 기준 셋)

현재 커버 (v0.0.1)

  • core: eqeqeq no-console no-param-reassign no-unused-vars no-undef
  • @typescript-eslint: consistent-type-imports array-type prefer-for-of 등 12룰

추가 필요 (작업 목록)

1. native 플러그인 활성화 + 룰 확장

  • react — rules-of-hooks / exhaustive-deps 포함 (react-hooks 5.2.0 기준, React Compiler 룰 제외)
  • jsx-a11y
  • promise
  • node
  • typescript 확장 — 현행 31룰 (패키지 12룰 외)
  • core 확장 — 현행 105룰 (패키지 5룰 외)

2. native 미지원 → jsPlugin으로 보존한 것

  • import/order (eslint-plugin-import) — groups/pathGroups/alphabetize/newlines-between 옵션 보존
  • unused-imports/no-unused-imports (eslint-plugin-unused-imports)
  • eslint-plugin-react 세부 옵션 복원 — no-unescaped-entities forbid [">","}"], jsx-no-undef allowGlobals
  • eslint core 7룰 (oxlint native 부재 → use-at-your-own-risk wrap):
    dot-notation no-dupe-args no-octal no-octal-escape no-undef-init no-unreachable-loop one-var
  • eslint-plugin-n 레거시 룰 (필요 시)

3. 사내 커스텀 룰 배선

  • @naverpay/eslint-plugin (naverpay/*)
  • @naverpay/eslint-plugin-use-client (rsc-lint) — use-client 3룰
  • custom/no-fetch-result-return — ※ card-apply-web 레포-로컬 룰. 공용 패키지 편입 여부는 검토 필요

4. settings / env

  • settings.react.version — oxlint가 "detect" 미지원 → 실제 버전 명시 방식 정리
  • settings.linkComponents
  • env 확장 (jest, vitest 등)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions