Files
test-repo/tests/format/js/arrows/parens.js
T
Kevin GibbonsandSosuke Suzuki b86d36a28b fix parentheses around sequence expression as body of arrow chain (#11593)
* fix parentheses around sequence expression as body of arrow chain

* add changelog

* lint

* Update changelog_unreleased/javascript/11593.md

Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>

Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2021-09-28 05:15:17 +09:00

19 lines
265 B
JavaScript

promise.then(
(result) => result,
(err) => err
)
promise.then(
(result) => { f(); return result },
(err) => { f(); return err }
)
foo(a => b)
foo(a => { return b })
foo(c, a => b)
foo(c, a => b, d)
foo(a => b, d)
foo(a => (0, 1));
foo(a => b => (0, 1));