Skip to content

Commit

Permalink
[eslint-v2][arrays] fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
hshoff authored and ljharb committed Feb 21, 2016
1 parent b79e951 commit 3983d38
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ Other Style Guides
});

// bad
inbox].filter((msg) => {
inbox.filter((msg) => {
const { subject, author } = msg;
if (subject === 'Mockingbird') {
return author === 'Harper Lee';
Expand All @@ -384,15 +384,14 @@ Other Style Guides
});

// good
[1, 2, 3].filter((x) => {
inbox].filter((msg) => {
const { subject, author } = msg;
if (subject === 'Mockingbird') {
return author === 'Harper Lee';
}
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 3983d38

Please sign in to comment.