JsonC support with `.json` suffix
Some important files, including .vscode/settings.json ends with .json prefix, but they are exactly JsonC (Json with Comments). Current deno fmt cannot format such json files when there are comments inside, which is really not convenient when using pure Deno and sharing VSCode workspace configurations. Can you enable JsonC support for those *.json files? Or this is designed by propose?
Current deno fmt cannot format such json files when there are comments inside, which is really not convenient when using pure Deno and sharing VSCode workspace configurations.
Can you show a reproduction? It works fine for me.
For me it works fine for all files inside the project. But if you open something like user preferences and try to format there, it shows this:
https://github.com/user-attachments/assets/341d4dc4-80c1-4dd2-b128-1ec3882e8350
I finally found out the reason 🥲: It's neither the matter about Deno, nor its VSCode extension, it's just a conflict with other extensions. I was using an AI assist extension like Copilot, which is called Tongyi Lingma (VSCode extension ID: Alibaba-Cloud.tongyi-lingma), that once format on save, such extension will stuck, and prevent all the formatting process. Once disable such extension, both deno fmt command and the VSCode extension works well.
It's exactly not caused by Deno or its VSCode extension, it's completely Tongyi Lingma's fault. Moreover, the Tongyi Lingma extension will also conflict with the Dart/Flutter extension on VSCode. Your code is prefect, their code contain bugs, and I'm really sorry for wasting your time.