Skip to content

Commit c97159b

Browse files
committed
Remove defaults for rule watchers-execution
1 parent f1ff88d commit c97159b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ rules:
146146
- angular/typecheck-number: 0
147147
- angular/typecheck-object: 0
148148
- angular/typecheck-string: 0
149-
- angular/watchers-execution: [0, "$digest"]
149+
- angular/watchers-execution: 0
150150
- angular/window-service: 0
151151
```
152152

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ rulesConfiguration.addRule('typecheck-function', 0);
5151
rulesConfiguration.addRule('typecheck-number', 0);
5252
rulesConfiguration.addRule('typecheck-object', 0);
5353
rulesConfiguration.addRule('typecheck-string', 0);
54-
rulesConfiguration.addRule('watchers-execution', [0, '$digest']);
54+
rulesConfiguration.addRule('watchers-execution', 0);
5555
rulesConfiguration.addRule('window-service', 0);
5656

5757
module.exports = rulesConfiguration.moduleExports();

rules/watchers-execution.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
'use strict';
1111

1212
module.exports = function(context) {
13+
var method = context.options[0] || '$digest';
1314
var methods = ['$apply', '$digest'];
1415
return {
1516

1617
MemberExpression: function(node) {
17-
var method = context.options[0];
1818
var forbiddenMethod = methods.filter(function(m) {
1919
return m !== method;
2020
});
@@ -29,5 +29,5 @@ module.exports = function(context) {
2929
};
3030

3131
module.exports.schema = [{
32-
type: 'string'
32+
enum: ['$apply', '$digest']
3333
}];

0 commit comments

Comments
 (0)