Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Rule to ban ts-ignore comments? #3626

Closed
JoshuaKGoldberg opened this issue Jan 8, 2018 · 5 comments
Closed

Rule to ban ts-ignore comments? #3626

JoshuaKGoldberg opened this issue Jan 8, 2018 · 5 comments

Comments

@JoshuaKGoldberg
Copy link
Contributor

https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#suppress-errors-in-ts-files-using--ts-ignore-comments

if (false) {
    // @ts-ignore: Unreachable code error
    console.log("hello");
}
@JoshuaKGoldberg
Copy link
Contributor Author

Awesome, this was fixed by #3728. 🎉

@mickaeltr
Copy link

Hello,
That's maybe a dumb question by I am wondering why I can't see this rule in the list?
My project is using TSLint 5.11.0
Thanks

@JoshuaKGoldberg
Copy link
Contributor Author

@mickaeltr what you're seeing is correct - TSLint 5.11.0 was released before this rule was merged in. A new version hasn't been released yet (folks from the Palantir side are still looking for a full-time maintainer). You'll have to wait for the next version. Sorry!

@mickaeltr
Copy link

Thanks for the answer @JoshuaKGoldberg, I missed that somehow.

@thecouchcoder
Copy link

Is there a way to ban tslint:disable comments?

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

No branches or pull requests

4 participants