You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
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!
The text was updated successfully, but these errors were encountered:
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!The text was updated successfully, but these errors were encountered: