[eslint-v2][arrays] update array-callback-return good/bad ex

This commit is contained in:
Harrison Shoff
2016-02-20 23:33:39 -08:00
committed by Jordan Harband
parent 822c0dfdfe
commit b79e951280

View File

@@ -374,9 +374,10 @@ 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;
}
@@ -384,12 +385,14 @@ Other Style Guides
// 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)**