Skip to content

Commit b90be75

Browse files
Merge branch 'development' into issue-229/function-type-rule-does-not-recognize-inline-named-functions-properly
2 parents b4ec24b + 66a661b commit b90be75

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

rules/on-watch.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ module.exports = function(context) {
4646
* argument of the string '$destroy'.
4747
*/
4848
function isFirstArgDestroy(node) {
49-
if (node.type !== 'CallExpression') {
50-
return false;
51-
}
52-
5349
var args = node.arguments;
5450

5551
return (args.length >= 1 &&

test/on-watch.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ eslintTester.run('on-watch', rule, {
3030
'scope.$on()',
3131
'scope.$watch()',
3232
'$scope.$on()',
33-
'$scope.$watch()'
33+
'$scope.$watch()',
34+
35+
// false positive check
36+
'$on()',
37+
38+
// uncovered edgecase
39+
'$scope["$on"]()'
3440

3541
],
3642
invalid: [

0 commit comments

Comments
 (0)