zero-tolerance-doctrine: noImplicitAny reported missing when strict is true
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- devtools
調査の方向性
false の検出結果は、src/checkers/sacred-laws/zero-tolerance.ts にある compilerOptions.strict と compilerOptions.noImplicitAny に対する2つの独立したチェックから生じているので、まずそこから始めてください。既存のチェックで strict がどう扱われているかを読み、次に noImplicitAny が未設定の場合と明示的に false の場合の違いを検討してください。strict: true で noImplicitAny がないフィクスチャでは検出結果が出ず、strict: true, noImplicitAny: false のフィクスチャでは引き続き検出されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 2時間 36分
- マージ済み PR(30日)
- 168
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Rule-Of-Code/RoC のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Rule-Of-Code/RoC#548 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Rule-Of-Code/RoC#547 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Rule-Of-Code/RoC#501 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
Rule-Of-Code/RoC#563 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
Rule-Of-Code/RoC#562 ·
メンテナーはふだん 1 日以内に返信
Rule-Of-Code/RoC の issue をすべて見る
似ている issue
-
bug done
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
neavo/LinguaGacha#1124 ·
メンテナーはふだん 1 日以内に返信
-
[fullsend] E2E: backstage-microsoft-auth — catalogQuery missing error handler for network errors対応中かも @fullsend-ai-coder が今日担当しました。 オープンe2e-failure ready-to-code
難易度 2/5 1時間未満 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugin-export-overlays#4821 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
brylie/mission-island#225 ·
メンテナーはふだん 1 日以内に返信
-
status/need-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google-gemini/gemini-cli#30412 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信