jsonvisual-studio-codeeslinttsconfig

How to deactive tsconfig.json comment errors in VS Code


self explanatory: tsconfig.json From a few days ago, it has been bothering me with eslint errors for tsconfig. From what I have read tsconfig.json it's an exception to comments, since it's handle by the ts server own parser.

It's annoying me since.


Solution

  • You probably accidentally changed the language mode to "json". VS Code should automatically associate files named tsconfig.json as "jsonc" (JSON with comments). Change the language mode back to "jsonc". You can click the language mode indicator in the status bar, or run Change Language Mode in the command palette.