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.
A lot of older JS programs used to put var self = this; variables all over the place. We no longer need to do that now that arrow lambdas are available. Still using this is likely a symptom of not having converted over yet and/or not using captured scopes correctly.
Some options for this rule that could be added in:
A. Names of allowed "self" equivalents (in the tslint-microsoft-contrib version)
B. Allow the variable if it's used in a later scope with a potentially different this.
A lot of older JS programs used to put
var self = this;
variables all over the place. We no longer need to do that now that arrow lambdas are available. Still using this is likely a symptom of not having converted over yet and/or not using captured scopes correctly.Bad:
Better:
This is in tslint-microsoft-contrib as
no-var-self
, though a better name might beno-self-equals-this
.The text was updated successfully, but these errors were encountered: