Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: Add never option to arrow-body-style
Arrow functions that return object literals can look very similar to arrow functions with brace bodies. Some syntactic ambiguity can be avoided by disallowing block-style arrow functions in favour of ES5 function expressions. **Outcome** The following patterns are considered problems: ``` /*eslint arrow-body-style: ["error", "never"]*/ /*eslint-env es6*/ let foo = () => { return 0; }; let foo = (retv, name) => { retv[name] = true; return retv; }; ``` The following patterns are not considered problems: ``` /*eslint arrow-body-style: ["error", "never"]*/ /*eslint-env es6*/ let foo = () => 0; let foo = () => ({ key: 0 }); ```
- Loading branch information