reactjs / reactjs/react.dev

ESLint v9 Migration Discussion

Đang mở
#8,261 0 bình luận 3 reaction 0 người được giao Xem trên GitHub

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

Ngôn ngữ chính
JavaScript
Star
11.8k
Fork
7.9k
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
11

Mô tả

Hi!

I'd like to get your thoughts on migrating to ESLint v9.

Currently, react.dev uses ESLint 7.x, which reached end-of-life in 2024. It's not causing immediate problems, but it's becoming a limitation for adopting new linting tools going forward.

For example, ko.react.dev introduced eslint-markdown to help maintain translation quality in markdown docs. However, these newer plugins only support ESLint 9's flat config. So right now, ko.react.dev is in an awkward situation where it uses ESLint 7 as the base, but has to run npx eslint@9 separately just for markdown linting:

"textlint-lint": "yarn textlint ... && npx --yes eslint@9 -c eslint.config.mjs"

When translation projects try to add more lint rules to improve documentation quality, ESLint 7 becomes a bottleneck. Official ESLint plugins like @eslint/markdown and @eslint/json are all flat config only.

This came up recently in a ko.react.dev discussion (reactjs/ko.react.dev#1406), where a maintainer mentioned:

"If you want CI/CD integration and improvements in this area, please submit an ESLint v9 migration PR to the react.dev repository first, so we can pull it in later."

They also noted that maintaining ESLint 7, ESLint 9, and Textlint together is becoming difficult, and an upstream migration would help simplify things for translation projects.

Also, some dependencies like babel-eslint and eslint-config-react-app are already deprecated and not even being used, so they'll need to be cleaned up at some point anyway.

Of course, this change would also affect other translation repositories, so I understand it needs careful consideration.

What do you think about upgrading to ESLint v9? If you're open to the idea, we might be able to help with the migration work.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Issue đề cập đến thiết lập ESLint 7.x của react.dev, entry point eslint.config.mjs của ko.react.dev và script textlint-lint, nhưng không có tệp hoặc test nào của react.dev. Trước tiên, hãy xác định các dependency ESLint và script lint của repository, sau đó xác định phạm vi migration và việc validation cần thiết trên các repository bản dịch trước khi triển khai.

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

Đánh giá

Công nghệ
javascript
Lĩnh vực
documentation, tooling
Loại issue
Tái cấu trúc
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
28/100

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.