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

refactor: fix // @ts-ignore to // @ts-expect-error #2874

Merged
merged 1 commit into from
May 16, 2023

Conversation

deepsource-autofix[bot]
Copy link
Contributor

TypeScript allows you to suppress all errors on a line by placing a single-line comment starting with @ts-ignore immediately before the erroring line. While powerful, there is no way to know if a @ts-ignore is actually suppressing an error without manually investigating what happens when the @ts-ignore is removed. This means its easy for @ts-ignores to be forgotten about, and remain in code even after the error they were suppressing is fixed. This is dangerous, as if a new error arises on that line it'll be suppressed by the forgotten about @ts-ignore, and so be missed.

TypeScript allows you to suppress all errors on a line by placing a single-line comment starting with `@ts-ignore` immediately before the erroring line. While powerful, there is no way to know if a `@ts-ignore` is actually suppressing an error without manually investigating what happens when the `@ts-ignore` is removed.  This means its easy for `@ts-ignores` to be forgotten about, and remain in code even after the error they were suppressing is fixed. This is dangerous, as if a new error arises on that line it'll be suppressed by the forgotten about `@ts-ignore`, and so be missed.
@deepsource-autofix deepsource-autofix bot requested a review from bigint as a code owner May 16, 2023 11:09
@vercel
Copy link

vercel bot commented May 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview May 16, 2023 11:17am
ui ✅ Ready (Inspect) Visit Preview May 16, 2023 11:17am
web ✅ Ready (Inspect) Visit Preview May 16, 2023 11:17am

@bigint bigint changed the title fix // @ts-ignore to // @ts-expect-error refactor: fix // @ts-ignore to // @ts-expect-error May 16, 2023
@bigint bigint enabled auto-merge (squash) May 16, 2023 11:09
@bigint bigint disabled auto-merge May 16, 2023 11:10
@bigint bigint merged commit 194b238 into main May 16, 2023
@bigint bigint deleted the deepsource-autofix-d0f8f28a branch May 16, 2023 11:10
@vercel vercel bot temporarily deployed to Preview – ui May 16, 2023 11:14 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender May 16, 2023 11:15 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant