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

Convert @ts-ignore to @ts-expect-error #19122

Merged
merged 2 commits into from
Sep 7, 2022
Merged

Convert @ts-ignore to @ts-expect-error #19122

merged 2 commits into from
Sep 7, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Sep 7, 2022

Issue: Usage of // @ts-ignore spread through the monorepo was potentially disabling type checks unnecessarily in some cases, potentially leading to unsafe code or bugs.

What I did

Converted each @ts-ignore to @ts-expect-error. If there was already a comment, I kept it, otherwise I added (Converted from ts-ignore) because there's a lint rule to give a reason. Then, I ran yarn bootstrap --build and removed the failing (unnecessary) disable directives until the build passed.

Overall, this should improve type coverage and give a better pattern for other devs to follow.

How to test

CI

And remove unused directives
@IanVS IanVS added maintenance User-facing maintenance tasks typescript labels Sep 7, 2022
@shilman shilman merged commit ea70649 into next Sep 7, 2022
@shilman shilman deleted the ts-expect-error branch September 7, 2022 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants