We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e193f68 commit 8980e28Copy full SHA for 8980e28
rules/always-return.js
@@ -283,19 +283,13 @@ module.exports = {
283
}
284
285
if (ignoreAssignmentVariable.length && isLastCallback(node)) {
286
- let hasIgnoredAssignment = false
287
-
288
- //istanbul ignore else
+ // istanbul ignore else
289
if (node.body?.type === 'BlockStatement') {
290
- node.body.body.forEach((statement) => {
+ for (const statement of node.body.body) {
291
if (isIgnoredAssignment(statement, ignoreAssignmentVariable)) {
292
- hasIgnoredAssignment = true
+ return
293
294
- })
295
- }
296
297
- if (hasIgnoredAssignment) {
298
- return
+ }
299
300
301
0 commit comments