Search code examples
jsontypescriptschematyped

How to type json files as tsconfig.json and package.json


I noticed that some json files with specific names get intellisense, like:

  1. tsconfig.json
  2. jsconfig.json
  3. package.json
  4. .eslintrc.json
  5. .prettierrc.json

Some screenchots

[enter image description here]

[enter image description here]

how can i type the schema of my own json files is it declares as a json module or something similar?


Solution

  • I already found that the json Schemas are based on the json-schema.org that would enable intellisense for json files

    here is a good intro for defining your own json schema https://json-schema.org/understanding-json-schema/basics.html

    here is a screenshot enter image description here