@@ -111,10 +111,12 @@ ruleTester.run('always-return', rule, {
111
111
{
112
112
code : 'hey.then(x => {})' ,
113
113
errors : [ { message } ] ,
114
+ options : [ { ignoreLastCallback : false } ] ,
114
115
} ,
115
116
{
116
117
code : 'hey.then(function() { })' ,
117
118
errors : [ { message } ] ,
119
+ options : [ { ignoreLastCallback : false } ] ,
118
120
} ,
119
121
{
120
122
code : 'hey.then(function() { }).then(x)' ,
@@ -123,42 +125,52 @@ ruleTester.run('always-return', rule, {
123
125
{
124
126
code : 'hey.then(function() { }).then(function() { })' ,
125
127
errors : [ { message } , { message } ] ,
128
+ options : [ { ignoreLastCallback : false } ] ,
126
129
} ,
127
130
{
128
131
code : 'hey.then(function() { return; }).then(function() { })' ,
129
132
errors : [ { message } ] ,
133
+ options : [ { ignoreLastCallback : false } ] ,
130
134
} ,
131
135
{
132
136
code : 'hey.then(function() { doSomethingWicked(); })' ,
133
137
errors : [ { message } ] ,
138
+ options : [ { ignoreLastCallback : false } ] ,
134
139
} ,
135
140
{
136
141
code : 'hey.then(function() { if (x) { return x; } })' ,
137
142
errors : [ { message } ] ,
143
+ options : [ { ignoreLastCallback : false } ] ,
138
144
} ,
139
145
{
140
146
code : 'hey.then(function() { if (x) { return x; } else { }})' ,
141
147
errors : [ { message } ] ,
148
+ options : [ { ignoreLastCallback : false } ] ,
142
149
} ,
143
150
{
144
151
code : 'hey.then(function() { if (x) { } else { return x; }})' ,
145
152
errors : [ { message } ] ,
153
+ options : [ { ignoreLastCallback : false } ] ,
146
154
} ,
147
155
{
148
156
code : 'hey.then(function() { if (x) { process.chdir(); } else { return x; }})' ,
149
157
errors : [ { message } ] ,
158
+ options : [ { ignoreLastCallback : false } ] ,
150
159
} ,
151
160
{
152
161
code : 'hey.then(function() { if (x) { return you.then(function() { return x; }); } })' ,
153
162
errors : [ { message } ] ,
163
+ options : [ { ignoreLastCallback : false } ] ,
154
164
} ,
155
165
{
156
166
code : 'hey.then( x => { x ? x.id : null })' ,
157
167
errors : [ { message } ] ,
168
+ options : [ { ignoreLastCallback : false } ] ,
158
169
} ,
159
170
{
160
171
code : 'hey.then(function(x) { x ? x.id : null })' ,
161
172
errors : [ { message } ] ,
173
+ options : [ { ignoreLastCallback : false } ] ,
162
174
} ,
163
175
{
164
176
code : `(function() {
@@ -181,6 +193,7 @@ ruleTester.run('always-return', rule, {
181
193
}
182
194
})` ,
183
195
errors : [ { message } ] ,
196
+ options : [ { ignoreLastCallback : false } ] ,
184
197
} ,
185
198
{
186
199
code : `
@@ -190,6 +203,7 @@ ruleTester.run('always-return', rule, {
190
203
}
191
204
})` ,
192
205
errors : [ { message } ] ,
206
+ options : [ { ignoreLastCallback : false } ] ,
193
207
} ,
194
208
{
195
209
code : `
0 commit comments