Skip to content

Commit e244a66

Browse files
committed
Merge pull request #205 from Gillespie59/development
0.10.1
2 parents b2378c9 + 66abbd3 commit e244a66

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-angular",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "ESLint rules for AngularJS projects",
55
"main": "index.js",
66
"repository": {
@@ -16,13 +16,13 @@
1616
"devDependencies": {
1717
"chai": "^3.2.0",
1818
"coveralls": "^2.11.4",
19-
"eslint": "^1.1.0",
19+
"eslint": "^1.3.1",
2020
"gulp": "^3.9.0",
2121
"gulp-eslint": "^1.0.0",
2222
"gulp-istanbul": "^0.10.0",
2323
"gulp-mocha": "^2.1.3",
24-
"istanbul": "^0.3.17",
25-
"mocha": "^2.2.5",
24+
"istanbul": "^0.3.19",
25+
"mocha": "^2.3.0",
2626
"shelljs": "^0.5.3",
2727
"shelljs-nodecli": "^0.1.1"
2828
},

rules/controller-name.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ module.exports = function(context) {
2020
var callee = node.callee;
2121
if(callee.type === 'MemberExpression' && callee.property.name === 'controller') {
2222
/**
23-
* Issue #124 for controller() calls inside karma tests
24-
*/
25-
if(node.arguments.length === 0){
23+
* Allow the usage of element.controller() and element.controller('directiveName') in unittests
24+
*/
25+
if(node.arguments.length < 2){
2626
return;
2727
}
2828

test/controller-name.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ eslintTester.run('controller-name', rule, {
2929
}, {
3030
code: 'controller = el.controller();',
3131
options: ['/[A-Z].*Controller$/']
32+
}, {
33+
code: 'controller = el.controller("no-match");',
34+
options: ['/^SpamController$/']
3235
}],
3336
invalid: [
3437
{

0 commit comments

Comments
 (0)