zero-tolerance-doctrine: noImplicitAny reported missing when strict is true
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/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ệ
- typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Kết quả false đến từ hai kiểm tra độc lập trên compilerOptions.strict và compilerOptions.noImplicitAny trong src/checkers/sacred-laws/zero-tolerance.ts, nên hãy bắt đầu từ đó. Đọc cách strict được xử lý trong kiểm tra hiện có, sau đó suy xét khi nào noImplicitAny chưa được đặt và khi nào nó được đặt tường minh là false. Hoàn thành khi một fixture có strict: true và không có noImplicitAny không tạo ra kết quả nào, còn fixture có strict: true, noImplicitAny: false vẫn tạo ra kết quả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: develop, and #503 (bugfix/486-foreign-json-reader)
Law: Zero Tolerance Doctrine (SACRED LAW): src/checkers/sacred-laws/zero-tolerance.ts
What happens
The law reports TypeScript noImplicitAny not enabled for a tsconfig that sets "strict": true and does not repeat "noImplicitAny": true. strict turns noImplicitAny on, so the finding is false.
develop, zero-tolerance.ts:
if (!tsConfig || !compilerOptions.strict) {
violations.push('TypeScript strict mode not enabled');
}
if (!tsConfig || !compilerOptions.noImplicitAny) {
violations.push('TypeScript noImplicitAny not enabled');
}
#503 reads the extends chain, but it keeps the same two independent checks (for (const [flag, finding] of [['strict', …], ['noImplicitAny', …]])).
Reproduction
A project whose tsconfig.json is { "compilerOptions": { "strict": true } } gets TypeScript noImplicitAny not enabled.
What I ruled out
This repository's own self-audit is not affected, because its tsconfig sets both flags explicitly. I have only read the code path above and have not built a fixture yet.
Suggested direction
Treat noImplicitAny as enabled when it is true, or when it is unset and strict is true. Only an explicit "noImplicitAny": false should be reported. strictModeOf in #503's src/utils/tsconfig-chain.ts already models this "strict implies" rule the other way round. Red/green: a fixture with strict: true and no noImplicitAny produces no finding, and one with strict: true, noImplicitAny: false still produces it.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 2 giờ 36 phút
- Pull request đã merge (30 ngày)
- 168
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 Rule-Of-Code/RoC
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Rule-Of-Code/RoC#548 ·
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 72/100
Rule-Of-Code/RoC#547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Rule-Of-Code/RoC#501 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Rule-Of-Code/RoC#563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
Rule-Of-Code/RoC#562 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Rule-Of-Code/RoC
Issue tương tự
-
bug done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
neavo/LinguaGacha#1124 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[fullsend] E2E: backstage-microsoft-auth — catalogQuery missing error handler for network errorsCó thể đã có người làm @fullsend-ai-coder đã nhận hôm nay. Đang mởe2e-failure ready-to-code
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 78/100
redhat-developer/rhdh-plugin-export-overlays#4821 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
brylie/mission-island#225 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status/need-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google-gemini/gemini-cli#30412 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày