bug: comments not allowed in wrangler.json, change the format to jsonc
VSCode provides an error for the comments in the wranger.json, changing it to .jsonc resolves the issue. We have 2 options to resolve this -
- Either change the format
- Or, remove the comments from the template (I don't like this tho)
I understand that many might not be familiar with the .jsonc format, so I wanted to bring this issue to everyone's attention and get your opinion.
Hi @MathurAditya724
Thank you for the issue.
My environment, my VSCode, does not show the error. And, the "Hello World" project that does not use Hono created by Create Cloudflare CLI uses wrangler.json not .jsonc It also does not throw the error.
Is this because my environment is different from yours, or do you need to make some setting?
I just checked again, and it turns out that my linter, biome, was giving me the error. Sorry for the false alarm.
I'm just curious if we should remove the comments in .json, as we have defined the schema and are getting the IntelliSense.
@MathurAditya724
Thank you for checking it.
I'm just curious if we should remove the comments in
.json, as we have defined the schema and are getting the IntelliSense.
I also thought that! The schema showing complement is good. But it will be more helpful to have comments. I want to know the opinions of others.