microsoft / microsoft/TypeScript
Support finding a `jsconfig.json` with `tsc -p .`
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Search Terms
jsconfig project
Suggestion
When I run tsc -p . on a JavaScript project with jsconfig.json and // @ts-check with JSDoc it complains about not finding a tsconfig.json
Currently I have to run tsc -p jsconfig.json --maxNodeModuleJsDepth 0 to check my JavaScript project.
~/projects/sync-wait-group on master*
$ tsc -p .
error TS5057: Cannot find a tsconfig.json file at the specified directory: '.'.
It tells me that tsconfig.json does not exist.
Adding detection for jsconfig.json and turning --maxNodeModuleJsDepth 0 on by default ( which we do for tsconfig.json but not jsconfig.json ) would be a good user experience improvmenent.
Use Cases
Being able to use the tsc cli on a JavaScript + JSDoc project.
Examples
tsc -p . will "just work" for a JavaScript project.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、jsconfig.json と JSDoc を含む // @ts-check がある JavaScript プロジェクトで、報告された tsc -p . の動作を再現します。tsc CLI がプロジェクト構成をどのように解決し、maxNodeModuleJsDepth を適用するかを追跡します。tsc -p . が jsconfig.json を検出し、明示的なフラグを必要とせずに意図したデフォルト値を使用すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- cli, compilers
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100