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