Skip to content

Commit

Permalink
[eslint-v2][arrays] update array-callback-return good/bad ex
Browse files Browse the repository at this point in the history
  • Loading branch information
hshoff authored and ljharb committed Feb 21, 2016
1 parent 8904578 commit 5908f1f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,22 +374,25 @@ Other Style Guides
});

// bad
[1, 2, 3].filter((x) => {
if (x > 2) {
return true;
inbox].filter((msg) => {
const { subject, author } = msg;
if (subject === 'Mockingbird') {
return author === 'Harper Lee';
} else {
return false;
}
});

// good
[1, 2, 3].filter((x) => {
if (x > 2) {
return true;
}
inbox].filter((msg) => {
const { subject, author } = msg;
if (subject === 'Mockingbird') {
return author === 'Harper Lee';
}

return false;
});
return false;
});
```
**[⬆ back to top](#table-of-contents)**
Expand Down

0 comments on commit 5908f1f

Please sign in to comment.