@@ -57,6 +57,8 @@ ruleTester.run("array-callback-return", rule, {
5757 "foo.filter(function() { return true; })" ,
5858 "foo.find(function() { return true; })" ,
5959 "foo.findIndex(function() { return true; })" ,
60+ "foo.findLast(function() { return true; })" ,
61+ "foo.findLastIndex(function() { return true; })" ,
6062 "foo.flatMap(function() { return true; })" ,
6163 "foo.forEach(function() { return; })" ,
6264 "foo.map(function() { return true; })" ,
@@ -77,6 +79,8 @@ ruleTester.run("array-callback-return", rule, {
7779 { code : "foo.filter(function() { return; })" , options : allowImplicitOptions } ,
7880 { code : "foo.find(function() { return; })" , options : allowImplicitOptions } ,
7981 { code : "foo.findIndex(function() { return; })" , options : allowImplicitOptions } ,
82+ { code : "foo.findLast(function() { return; })" , options : allowImplicitOptions } ,
83+ { code : "foo.findLastIndex(function() { return; })" , options : allowImplicitOptions } ,
8084 { code : "foo.flatMap(function() { return; })" , options : allowImplicitOptions } ,
8185 { code : "foo.forEach(function() { return; })" , options : allowImplicitOptions } ,
8286 { code : "foo.map(function() { return; })" , options : allowImplicitOptions } ,
@@ -129,8 +133,12 @@ ruleTester.run("array-callback-return", rule, {
129133 { code : "foo.filter(function foo() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function 'foo'" , arrayMethodName : "Array.prototype.filter" } } ] } ,
130134 { code : "foo.find(function() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function" , arrayMethodName : "Array.prototype.find" } } ] } ,
131135 { code : "foo.find(function foo() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function 'foo'" , arrayMethodName : "Array.prototype.find" } } ] } ,
136+ { code : "foo.findLast(function() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function" , arrayMethodName : "Array.prototype.findLast" } } ] } ,
137+ { code : "foo.findLast(function foo() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function 'foo'" , arrayMethodName : "Array.prototype.findLast" } } ] } ,
132138 { code : "foo.findIndex(function() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function" , arrayMethodName : "Array.prototype.findIndex" } } ] } ,
133139 { code : "foo.findIndex(function foo() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function 'foo'" , arrayMethodName : "Array.prototype.findIndex" } } ] } ,
140+ { code : "foo.findLastIndex(function() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function" , arrayMethodName : "Array.prototype.findLastIndex" } } ] } ,
141+ { code : "foo.findLastIndex(function foo() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function 'foo'" , arrayMethodName : "Array.prototype.findLastIndex" } } ] } ,
134142 { code : "foo.flatMap(function() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function" , arrayMethodName : "Array.prototype.flatMap" } } ] } ,
135143 { code : "foo.flatMap(function foo() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function 'foo'" , arrayMethodName : "Array.prototype.flatMap" } } ] } ,
136144 { code : "foo.map(function() {})" , errors : [ { messageId : "expectedInside" , data : { name : "function" , arrayMethodName : "Array.prototype.map" } } ] } ,
0 commit comments