For example, you want to use $scope.$watch instead of $scope.watch
Rule based on Angular 1.x
The following patterns are considered problems;
/*eslint angular/avoid-scope-typos: 2*/
// invalid
$scope.apply.forEach(function (watcher) {
// ...
}); // error: The apply method should be replaced by $apply, or you should rename it in order to avoid confusions
// invalid
$rootScope.apply.forEach(function (watcher) {
// ...
}); // error: The apply method should be replaced by $apply, or you should rename it in order to avoid confusions
The following patterns are not considered problems;
/*eslint angular/avoid-scope-typos: 2*/
// valid
$scope.$apply();
// valid
$rootScope.$apply();
This rule was introduced in eslint-plugin-angular 2.3.0