-
-
Notifications
You must be signed in to change notification settings - Fork 61
Description
I use a JSONC file over JSON for my markdownlint-cli2 config to add comments.
In prettier via prettier/prettier#15553 a new jsonc parser was added, which is released but I think only in the 4.0 alpha. With this new parser prettier adds trailing commas to jsonc source. When I ran my QA toolchain, after updating the tools, markdownlint suddenly was throwing. The reason was, that the jsonc config (with trailing commas) could not be correctly parsed. I looked up the stacktrace and found the internal jsonc parser, which is at base just JSON.parse() which in turn does not allow trailing commas hence the issue. Based on this prettier/prettier#15553 (comment) it would propably be a good to utilize a fully fledged jsonc parser like https://github.com/microsoft/node-jsonc-parser?