microsoft / microsoft/TypeScript
Support finding a `jsconfig.json` with `tsc -p .`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das gemeldete Verhalten von tsc -p . in einem JavaScript-Projekt mit jsconfig.json und // @ts-check mit JSDoc zu reproduzieren. Verfolge, wie die tsc-CLI die Projektkonfiguration auflöst und maxNodeModuleJsDepth anwendet; abgeschlossen ist die Aufgabe, wenn tsc -p . jsconfig.json entdeckt und den vorgesehenen Standardwert verwendet, ohne explizite Flags zu benötigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- cli, compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100