-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow comments in tsconfig.json files
Previously, if your tsconfig.json file contained a comment (allowed by the TS compiler) the ts-import-types-cli would throw the following error: `ts-import-types-cli --project /myproject/tsconfig.json is not a tsconfig.json file` This is because the node `require` function can only parse valid (commentless) JSON. This PR swaps out the use of `require` in favor of directly reading the file contents, stripping all comments, and only then parsing it to confirm that it is valid JSON. Hopefully this will save other users some confusion!
- Loading branch information
Showing
3 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters