Using prettier , the code snippets files in vscode end upp having red lines because those files are json with comments. The language mode for those files in vscode is set to "Code snippets", but if I change it to "jsonc", the red lines go away. But this change reverts back to "Code snippets" after a while after restarting.
So I thought I could make prettier interpret the "Code snippets" as jsonc:
I created a .prettierrc file with this info:
{
"overrides": [
{
"files": "**/snippets/*.json",
"options": {
"parser": "jsonc"
}
}
]
}
The snippets files are in a nested file path in a "snippets" folder.
But it didn't work, I also tried "files": "snippets/*.json".
Can it be achieved in some way?
-
this can probably be solved with prettier config(?) prettier apparently supports jsonc since 3.2starball– starball ♦2025年03月19日 03:10:49 +00:00Commented Mar 19 at 3:10