Skip to content

Conversation

@ShiboSoftwareDev
Copy link
Contributor

This pull request improves the handling of tsconfig.json files to make
parsing more robust and provide clearer error messages.

• Updated getTsConfig to strip comments from tsconfig.json content before
parsing, as comments are common in these files but not supported by
standard JSON.parse.
• Modified getTsConfig to throw a descriptive error when JSON parsing
fails, making it easier to diagnose malformed configuration files.
• Added a new test case to verify that an invalid tsconfig.json correctly
throws an error.

/claim #1317
/closes #1317

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now everyone will know why i'm always yelling about silencing errors 😁

@ShiboSoftwareDev ShiboSoftwareDev merged commit 9434e03 into tscircuit:main Oct 17, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error out when we can't parse tsconfig, add support for parsing tsconfig with comments

2 participants