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

Enforce usage of @ts-expect-error over @ts-ignore #280

Open
mcmire opened this issue Mar 8, 2023 · 0 comments
Open

Enforce usage of @ts-expect-error over @ts-ignore #280

mcmire opened this issue Mar 8, 2023 · 0 comments

Comments

@mcmire
Copy link
Contributor

mcmire commented Mar 8, 2023

Occasionally it is useful when converting a codebase to TypeScript to allow TypeScript errors, such as in this case for eth-ledger-bridge-keyring. The default configuration for the ban-ts-comment rule bans @ts-ignore and allows @ts-expect-error with a description. There's nothing wrong with this; however, I am not sure how many people know about this tag. I've seen people try to use @ts-ignore and then get around the lint violation by pairing it with an eslint-disable comment. While we can't prevent this, I think we can make the lint violation error more useful. I propose that we enable the prefer-ts-expect-error rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant