Skip to content

Commit 190022e

Browse files
Merge pull request #457 from Gillespie59/development
Development
2 parents 76c3c23 + 64fabf0 commit 190022e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-angular",
3-
"version": "1.6.3",
3+
"version": "1.6.4",
44
"description": "ESLint rules for AngularJS projects",
55
"main": "index.js",
66
"scripts": {

rules/di.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module.exports = {
107107
return;
108108
}
109109
}
110-
} else {
110+
} else if (fn.params.length > 0) {
111111
report(fn);
112112
}
113113
} else if (fn.params && fn.params.length !== 0) {

test/di.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ angularObjectList.forEach(function(object) {
3838
}, {
3939
code: 'angular.module("myModule").' + object + '(myFunction);function MyFunction() {}',
4040
options: ['function']
41+
}, {
42+
code: 'angular.module("myModule").' + object + '(myFunction);function myFunction() {}',
43+
options: ['$inject']
4144
}, {
4245
code: 'angular.module("myModule").' + object + '(myFunction);myFunction.$inject=[];function myFunction() {}',
4346
options: ['$inject']

0 commit comments

Comments
 (0)