-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Rules: Deprecate prefer-ts-expect-error in favor of ban-ts-comment #8333
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
Comments
I think that this behaviour is still correct. In most code any form of TS comment is a code smell. So having an error to warn against using Having an error to warn against Think of it this way: the rules are saying "hey 100% definitely do not use If you use the "correct" suppression you only need one disable comment to say "yeah I'm doing this on purpose". If you use the "incorrect" one you need two to say "I'm really, really doing this on purpose and I know I'm breaking the rules". |
No, I mean the rules do exactly the same thing, they both warn on
|
I see how that So you are indeed correct - by default We should just remove the former entirely. Cc @typescript-eslint/triage-team |
I had the idea too; I just thought |
Yeah the name is nice but |
+1 to this: if there's anything |
Yep, But while looking through the Assume we have the following code: /** some text here
@ts-ignore */
const foo: string = 1
I think Filed #8368 |
ban-ts-comment
Before You File a Proposal Please Confirm You Have Done The Following...
Description
One line of code triggers two different rules:
So if I must use
@ts-ignore-error
(due to flaky typescript errors) I have to disable two rules.Why are there two rules that do the same thing? Given that
prefer-ts-expect-error
already exists, I think it would make sense to drop the specific check fromban-ts-comment
Impacted Configurations
I think one is in
recommended
and the other one is just instrict
Additional Info
No response
The text was updated successfully, but these errors were encountered: