ESLint 9 Migration
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- eslint, nodejs, typescript
Hướng nghiên cứu
Đọc hướng dẫn di chuyển ESLint, sau đó so sánh .eslintrc.json và .eslintignore với các tệp được yêu cầu là eslint.config.js và eslint.ignores.js. Chạy các bước kiểm tra linting và test sau khi di chuyển, rồi giải quyết hoặc chủ động cấu hình các phát hiện được liệt kê để gỡ chặn việc nâng cấp lên gts v7 và giúp CI chạy qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The Pull Request chore(deps): update dependency gts to v7 #3856 is currently blocked due to CI failures.
The core of the issue is that gts v7 upgrades the linter to ESLint v9, which introduces a breaking change by switching to a new "Flat Config" system. The existing configuration infrastructure is incompatible with this new version.
Resolving this requires a two-step approach.
Step 1: Infrastructure Migration (ESLint 9 Flat Config)
ESLint 9 drops support for .eslintrc.json and .eslintignore. The project must migrate to eslint.config.js and eslint.ignores.js.
Findings & Reference
In Flat Config, ignore patterns are strictly relative to the configuration file, and global variables (like process or module in Node.js) must be explicitly declared in the config for JavaScript files.
- Reference: ESLint Migration Guide - Ignoring Files
Required Technical Changes
- Create
eslint.ignores.js: Export the array of ignore patterns (migrated from.eslintignore). - Create
eslint.config.js:- Extend
gts. - Import ignore patterns.
- Declare
globals.nodefor**/*.jsfiles to preventno-undeferrors.
- Extend
- Clean up: Delete
.eslintrc.jsonand.eslintignore.
Step 2: Code Compliance (New Linting Findings)
After migrating to ESLint v9, the new linter identifies several violations in the existing codebase that were previously ignored or not checked with the same intensity. We need to determine the best path forward for these findings, whether is to mute the findings, fix the findings, or come up with a hybrid approach.
Findings
The following rules are failing across multiple files (many of which are autogenerated):
@typescript-eslint/no-unused-vars@typescript-eslint/no-explicit-any@typescript-eslint/no-unused-expressions
Open Questions:
- Mute the findings (Short-term): Should we disable these rules in
eslint.config.jsto unblock thegtsv7 upgrade? This would maintain the current state of the codebase while adopting the new tooling. - Fix the findings (Long-term): Since many of these files are autogenerated, should we block the upgrade until the generator logic is updated to produce compliant code?
- Hybrid Approach: Mute them now but create a follow-up task to address the generator's output?
NOTE: muting these rules in the new
eslint.config.jsallowed all linting checks and tests to pass successfully when testing this changes locally.
- Ngôn ngữ chính
- TypeScript
- Star
- 12.3k
- Fork
- 2k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của googleapis/google-api-nodejs-client
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
googleapis/google-api-nodejs-client#3932 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Discovery Engine] streamAnswer is typed as one AnswerQueryResponse, but REST returns frame arraysĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
googleapis/google-api-nodejs-client#3930 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
googleapis/google-api-nodejs-client#3927 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
size: l type: feature request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
googleapis/google-api-nodejs-client#3926 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type: feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
googleapis/google-api-nodejs-client#3903 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của googleapis/google-api-nodejs-client
Issue tương tự
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mermaid-js/mermaid-live-editor#2053 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
factory
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jessepollak/home#1455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
lingdojo/kana-dojo#31227 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mobile: device viewer shows dark status bar icons on its dark backdrop in light mode (Android)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
appandflow/stim#1838 ·
Maintainer thường phản hồi trong vòng 1 ngày