You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TypeScript tsc compiler (and other tools) use jsonc format, that includes comments, but Sucrase uses the built in JSON parser, which has problems:
JSON.parse does not support comments.
JSON.parse will fail on trailing commas
This means that the default output of tsc --init immediately breaks this tool.
I recommend using jsonc-parser which is the same package that VSCode uses for reading its json configuration files. This would ensure sucrase supports the same features as TypeScript.
The text was updated successfully, but these errors were encountered:
The TypeScript tsc compiler (and other tools) use
jsonc
format, that includes comments, but Sucrase uses the built in JSON parser, which has problems:This means that the default output of
tsc --init
immediately breaks this tool.I recommend using jsonc-parser which is the same package that VSCode uses for reading its json configuration files. This would ensure sucrase supports the same features as TypeScript.
The text was updated successfully, but these errors were encountered: