How to set jsonls to hide the errors for comments?

I’m using jsonls as a language server for JSON file. It works fine without having comments in JSON file like tsconfig.json in which jsonls shows a lot of errors like this;

Also, I know that JSON doesn’t allow comments in it, but tsconfg.json originally had comments when it was generated.

Is there anyone who knows how to prevent these errors by configuring something?

The original tsconfig.json was very likely in JSON5 format which allows comments.

I don’t know if the language server supports JSON5 or if you need to install support for the corresponding filetype.

Hope this helps.

:set filetype=jsonc might help