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

allow ban to match calls on any object #1407

Closed
jab opened this issue Jul 16, 2016 · 1 comment
Closed

allow ban to match calls on any object #1407

jab opened this issue Jul 16, 2016 · 1 comment

Comments

@jab
Copy link

jab commented Jul 16, 2016

I recently started contributing to a large typescript codebase, and recently discovered several .substr() calls scattered throughout the codebase that some of the other contributors didn't realize did a different thing than .substring() (when a second argument is provided), and it looks like .substring() was actually the intended method. After converting all .substr() calls to .substring(), it'd be great if we could add a tslint rule to prevent future .substr() calls from sneaking in. I was hoping the ban rule would get us there, but it requires you to specify what objects to ban the provided methods call on, with apparently no way to just ban all .foo() calls on any object. Would you be open to allowing e.g. "*" to be provided as the object to accomplish this? Thanks for your consideration, and thanks for tslint!

@JoshuaKGoldberg
Copy link
Contributor

This was fixed by #2547! 🎉

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

2 participants