Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reading tsconfig file and compilerOptions, prettier supressTypeErrors message #2053

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rubiesonthesky
Copy link
Collaborator

PR Checklist

Overview

supersedes #1542

  • Fixes reading tsconfig and handling the values.
    • This can be seen in the snapshot files, where values for compilerOptions have been changed.
  • Options from typestat.json should not disable noImplicitAny or noImplicitThis if they are enabled in tsconfig.
  • Fix reading included files by changing how ts.parseJsonConfigFileContent is setup. This can been seen in action for example in include test. While before we had include: [], now we have list of files.
  • When adding ts-expect-error comments, 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.
  • Enable suppressTypeErrors in tests so we can see if there are incorrect results

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 93.84615% with 4 lines in your changes missing coverage. Please review.

Project coverage is 75.40%. Comparing base (4eb4679) to head (6633b4a).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/options/loadPendingOptions.ts 0.00% 2 Missing ⚠️
src/options/parseRawCompilerOptions.ts 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2053      +/-   ##
==========================================
+ Coverage   74.80%   75.40%   +0.59%     
==========================================
  Files         177      177              
  Lines        7590     7543      -47     
  Branches     1063     1060       -3     
==========================================
+ Hits         5678     5688      +10     
+ Misses       1907     1849      -58     
- Partials        5        6       +1     
Flag Coverage Δ
mutation 65.10% <93.84%> (+0.53%) ⬆️
unit 17.20% <6.15%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rubiesonthesky rubiesonthesky force-pushed the fix-reading-compiler-options-and-prettify-suprressErrors branch from 9b9015f to 5c72262 Compare December 6, 2024 20:43
@rubiesonthesky rubiesonthesky force-pushed the fix-reading-compiler-options-and-prettify-suprressErrors branch from 5c72262 to 6633b4a Compare December 6, 2024 20:49
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

These look like a lot of great changes but they're ... a lot 😅. It'd be a slog for me to review all of them together. Could you please split them out into discrete PRs?

If some rely on a first one then I think it'd be reasonable to just do that first one first, with maybe a branch/comparison linked to show what would come next.

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Dec 7, 2024
@rubiesonthesky
Copy link
Collaborator Author

@JoshuaKGoldberg I agree. They are little bit linked together.

I wonder, if I start with the one that enables suppressTypeError then we can see how the other fixes actually affect things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for author Needs an action taken by the original poster
Projects
None yet
2 participants