[eslint-v2][arrow functions] improve examples

This commit is contained in:
Harrison Shoff
2016-02-14 14:50:49 -08:00
committed by Jordan Harband
parent 6a03a32915
commit ba10353e9b

View File

@@ -821,13 +821,13 @@ Other Style Guides
```js
// bad
const isActive = item => item.height > 256 ? true : false;
const itemHeight = item => item.height > 256 ? item.largeSize : item.smallSize;
// bad
const isActive = (item) => item.height > 256 ? true : false;
const itemHeight = (item) => item.height > 256 ? item.largeSize : item.smallSize;
// good
const isActive = item => { return item.height > 256 ? true : false; }
const itemHeight = item => { return item.height > 256 ? item.largeSize : item.smallSize; }
```
**[⬆ back to top](#table-of-contents)**