microsoft / microsoft/TypeScript

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

Open
#54,192 3 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting how the TypeScript package is assembled and published, then identify where tsconfig.json and jsconfig.json configuration definitions are maintained. Compare the desired package-local schemas with the existing SchemaStore approach and confirm that the schemas stay synchronized with releases and are included in the published package.

Written by the indexing model from the issue text.

Assessment

Tech stack
json, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.