TypeStat
TypeStat copied to clipboard
fix: fixes reading tsconfig and handling compilerOptions
PR Checklist
- [x] Addresses an existing open issue: fixes #1532 fixes #1522
- [x] That issue was marked as
status: accepting prs - [x] Steps in CONTRIBUTING.md were taken
Overview
Follows https://github.com/JoshuaKGoldberg/TypeStat/pull/1534
- Fixes reading
tsconfigand handling the values.- This can be seen in the snapshot files, where values for
compilerOptionshave been changed.
- This can be seen in the snapshot files, where values for
- Options from
typestat.jsonshould not disablenoImplicitAnyornoImplicitThisif they are enabled intsconfig. - Fix reading included files by changing how
ts.parseJsonConfigFileContentis setup. This can been seen in action for example in include test. While before we hadinclude: [], now we have list of files. - When adding
ts-expect-errorcomments, do not add full path to files. If there are multiple people working in the same project, absolute path will not be same for everyone. createProgramConfigurationandparseRawCompilerOptionsboth useparseJsonConfigFileContentsfunction. No need to duplicate this code.