question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tsconfig json with comments is not supported

See original GitHub issue

Hey

npx unimported is failing with the error file does not contain valid json: tsconfig.json error: SyntaxError: Unexpected token / in JSON at position 59 at JSON.parse (<anonymous>) at Object.<anonymous> (C:\Users\shchaw\AppData\Roaming\npm-cache\_npx\29832\node_modules\unimported\dist\fs.js:67:32) at Generator.next (<anonymous>) ^TSyntaxError: Unexpected token / in JSON at position 59^T^C P.S my tsconfig does not even have 30 lines

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
smeijercommented, Aug 8, 2021

Supported in v1.18 😎

0reactions
Shivam60commented, Aug 9, 2021

Thanks for quick resolution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why normal json files don't allow comments where as tsconfig ...
There is no configuration to allow comments in JSON, because JSON doesn't support comments. JSON-derived formats such as JSON5 do. Share.
Read more >
Allow comments in tsconfig.json #4987 - microsoft/TypeScript
Comments don't seem to be allowed in the tsconfig.json file. See this article for why it is ok according to Douglas Crockford to...
Read more >
tsconfig.json isn't strict JSON, what now? : r/typescript - Reddit
JSON doesn't support comments which makes it unsuitable for configs. Comments are often supported where "JSON" is used for configuration. Pretty ...
Read more >
Cory House on Twitter: "Woah, I just learned that tsconfig.json ...
json allows comments! json doesn't normally allow comments, but comments are valid in tsconfig. json. It's officially supported by TypeScript!
Read more >
Documentation - What is a tsconfig.json - TypeScript
The tsconfig.json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig.json file ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found