oxlint-config에 react 프리셋 추가#166
Draft
yujeong-jeon wants to merge 6 commits into
Draft
Conversation
Contributor
✅ Changeset detectedLatest commit: 03895b7
If no version change is needed, please add The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
|
Contributor
Author
|
/canary-publish |
Contributor
Published Canary Packages |
Contributor
Author
|
/canary-publish |
Contributor
Published Canary Packages |
Contributor
Author
카나리 검증 피드백 (
|
카나리(0.1.0-canary.260701-d925f10) react 프리셋을 card-apply-web에서 검증한 결과, oxlint의 extends는 rules/plugins/jsPlugins만 병합하고 env/globals/categories는 상속하지 않음을 확인 (oxlint 1.71.0/1.72.0, oxc#20087). - categories 미상속 → unicorn/* 룰 의도치 않은 발화 - env 미상속 → no-undef가 require/module/process 등을 false positive로 잡음 - 프리셋에 globals 직접 추가해도 extends로 상속되지 않아 해결 불가 (검증 완료) README의 Node.js/React 예시에 env/categories를 소비자 최상위에 직접 작성하도록 안내하고, 한계를 명시하는 Note 추가. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Related Issue
#164
Describe your changes
@naverpay/eslint-config의 react 프리셋을 기준으로@naverpay/oxlint-config에 react 프리셋을 신설하고, oxlint 네이티브에 없는 룰 중 문자열 포맷으로 로드 가능한 jsPlugins 2종을 추가했습니다.1. react 프리셋 (native)
packages/oxlint-config/react/.oxlintrc.json신규 —node프리셋을extends하고plugins: ["react", "jsx-a11y"]활성화 (두 플러그인은 기본 비활성 → 선언해야 correctness 룰이 켜짐)curly,no-restricted-imports(lodash),react/rules-of-hooks,react/exhaustive-deps,react/jsx-handler-names,jsx-a11y/{alt-text,label-has-associated-control}package.jsonfiles에react디렉토리 추가2. jsPlugins 룰 (string 포맷,
oxlint@>=1.0호환 유지)eslint-plugin-unused-imports→unused-imports/no-unused-imports@naverpay/eslint-plugin→@naverpay/prevent-default-import(node의 unused-imports는extends로 병합 상속)dependencies로 추가 (@naverpay/eslint-plugin: workspace:*,eslint-plugin-unused-imports: ^4.1.4)함께 반영 (code-style-cli 문서 수정)
packages/code-style-cli/README.md의 oxfmt 가이드에서 "별도 config 패키지가 없습니다" 라는 잘못된 문장만 제거 (@naverpay/oxfmt-config패키지가 존재). patch changeset 추가검증
extends로 native + node 상속(unused-imports) + react jsPlugin(@naverpay/prevent-default-import)이 모두 정상 발화하는 것을 확인oxlint --rules대조로 네이티브 지원 룰 선별 (oxlint는 미지원 룰명을 조용히 무시)범위 외 (후속 · Phase B)
import/order(eslint-plugin-import)와 react 옵션 오버라이드(eslint-plugin-react)는import/react네임스페이스가 예약되어 문자열 포맷으로 로드 불가합니다. rename이 되는 객체 포맷이 필요하고 이는 oxlint 상향(및 1.x 하위호환 포기)을 수반하므로 별도 작업으로 분리합니다.