Skip to content

Handle comments in JSONC#11

Open
romainl wants to merge 2 commits intowuelnerdotexe:mainfrom
romainl:main
Open

Handle comments in JSONC#11
romainl wants to merge 2 commits intowuelnerdotexe:mainfrom
romainl:main

Conversation

@romainl
Copy link
Copy Markdown

@romainl romainl commented Apr 19, 2024

tsconfig.json files are actually JSONC. This commit removes lines like the following before parsing the content as JSON:

// some comment
/*
 * foo
 * bar
*/

but it doesn't handle inline comments:

  "key": "value", // some comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants