How to get VS Code to stop complaining about comments in JSON files:

  1. Open your settings as JSON.
  2. Add this:
"files.associations": {
    "*.json": "jsonc"
}

I'm not saying you want to do this. You might not. JSON shouldn't have comments. But if you do want to, that's how you do it.

You can also use specific file names or paths there instead of grenading every *.json file into *.jsonc (json "with comments").

Labels: ,