microsoft / microsoft/TypeScript

Add JSON schema to the `typescript` package for `tsconfig.json` and `jsconfig.json`

Offen
#54,192 3 Kommentare 10 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Awaiting More Feedback Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

Suggestion

🔍 Search Terms

  • JSON schema
  • SchemaStore
  • tsconfig.json
  • jsconfig.json

✅ Viability Checklist

N/A

📃 Why

I noticed that Rome doesn't use a traditional hosted JSON schema and instead they publish their JSON schema in their package so that it can then be referenced with a local path:

{
  "$schema": "./node_modules/rome/configuration_schema.json",
}

I see three advantages to this approach...

  1. The JSON schema will match the installed version of the package.
  2. The JSON schema will work without internet access, provided that node_modules has been installed.
  3. Any changes to the JSON schema in the development can be used straight away in examples, etc.

⭐ Suggestion

Maintain the JSON schema in this repository, instead of the the SchemaStore repository. It will be kept in sync with new TypeScript releases. Finally, publish the JSON schemas in the typescript package.

You can still leave the hosted JSON schema as an option, which will always resolve to the JSON schemas for the latest version of TypeScript. This will still be needed for editor autocomplete, whereby the schema is not specified in the JSON, but detected from the name of the file.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit zu untersuchen, wie das TypeScript-Paket zusammengestellt und veröffentlicht wird, und ermittle anschließend, wo die Konfigurationsdefinitionen für tsconfig.json und jsconfig.json gepflegt werden. Vergleiche die gewünschten paketeigenen Schemas mit dem bestehenden SchemaStore-Ansatz und stelle sicher, dass die Schemas mit den Releases synchron bleiben und im veröffentlichten Paket enthalten sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
json, typescript
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.