yarn.lock resolves eslint-plugin-jest's @typescript-eslint/utils to 8.39.1, whose TypeScript peer excludes the repo's TypeScript 6.0.3

Đang mở Phù hợp với người mới
#59,945 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, typescript
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Bắt đầu với yarn.lock và kiểm tra các phiên bản @typescript-eslint/utils được phân giải cho eslint-plugin-jest và thư mục gốc. So sánh các khoảng phiên bản peer dependency của TypeScript, sau đó kiểm tra bản cập nhật lockfile theo cách tái hiện issue bằng yarn install --frozen-lockfile. Hoàn thành khi eslint-plugin-jest phân giải được phiên bản tương thích và bốn cảnh báo peer dependency không chính xác đã biến mất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

https://github.com/react/react-native/pull/56772 moved the root to typescript ^6.0.3 and @typescript-eslint/* to ^8.59.2 for TypeScript 6 compatibility, but yarn.lock still resolves eslint-plugin-jest's "@typescript-eslint/utils@^8.0.0" to 8.39.1. yarn install places that copy under node_modules/eslint-plugin-jest/, and its typescript-estree, project-service and tsconfig-utils declare typescript >=4.8.4 <6.0.0, so every install on main warns four times. The 8.59.2 the root already installs satisfies ^8.0.0 and declares >=4.8.4 <6.1.0.

Steps to reproduce
  1. In a clone of main, run yarn install --frozen-lockfile; or run bash repro.sh from the reproducer below, which clones main, installs with --ignore-scripts and reads which @typescript-eslint/utils eslint-plugin-jest loads.

Expected: eslint-plugin-jest loads a @typescript-eslint/utils whose TypeScript peer includes 6.0.3, such as the 8.59.2 the root installs, and the install prints no incorrect peer dependency "typescript@>=4.8.4 <6.0.0" warning.
Actual: it loads 8.39.1 from node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils, and the install prints the four warnings below.

React Native Version

main (b9a83f3)

Affected Platforms

Build - Windows

Output of npx @react-native-community/cli info

Not applicable: this is the repository's own yarn.lock. The reproducer's run: react-native b9a83f3 (2026-11-11), node v26.12.1, yarn 1.22.22, MINGW64_NT-10.0-26300 x86_64

Stacktrace or Logs
react-native b9a83f3 (2026-11-11), node v26.12.1, yarn 1.22.22, MINGW64_NT-10.0-26300 x86_64
yarn install --frozen-lockfile --ignore-scripts:
warning "eslint-plugin-jest > @typescript-eslint/[email protected]" has incorrect peer dependency "typescript@>=4.8.4 <6.0.0".
warning "eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/[email protected]" has incorrect peer dependency "typescript@>=4.8.4 <6.0.0".
warning "eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/typescript-estree > @typescript-eslint/[email protected]" has incorrect peer dependency "typescript@>=4.8.4 <6.0.0".
warning "eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/typescript-estree > @typescript-eslint/[email protected]" has incorrect peer dependency "typescript@>=4.8.4 <6.0.0".
eslint-plugin-jest 29.0.1 loads @typescript-eslint/utils 8.39.1 from node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils
its @typescript-eslint/typescript-estree 8.39.1 declares the peer typescript >=4.8.4 <6.0.0
the repository installs typescript 6.0.3
SUMMARY: eslint-plugin-jest's @typescript-eslint/utils 8.39.1 supports typescript >=4.8.4 <6.0.0, and the repository installs typescript 6.0.3
MANDATORY Reproducer

https://gist.github.com/YevheniiKotyrlo/db82046b02b7939e3c328f5d80b86009 — bash repro.sh exits 1 while eslint-plugin-jest loads a @typescript-eslint/utils whose TypeScript peer excludes the repository's TypeScript, and 0 once it includes it.

Screenshots and Videos

No response

Ngôn ngữ chính
C++
Star
127k
Fork
25.5k
Merge trung bình
3 ngày 18 giờ
Pull request đã merge (30 ngày)
188

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của react/react-native

Tất cả issue của react/react-native

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.