This results in arrow functions being used for callbacks (unless they reference this or arguments, in which case they would need be converted manually). When arrow functions contain a single return statement, the body-less style is prefered (e.g. ( x ) => x + 1. Also a single line is prefered for such body-less functions.
We should consider the following rules in ES6 code:
This results in arrow functions being used for callbacks (unless they reference
this
orarguments
, in which case they would need be converted manually). When arrow functions contain a single return statement, the body-less style is prefered (e.g.( x ) => x + 1
. Also a single line is prefered for such body-less functions.