Commit Graph
5 Commits
Author SHA1 Message Date
046ffb11f9 Support better formatting for curried arrow functions (#9992)
* Support formatting for curried arrow functions

* Fix test file name

* Fix threshold

* Add changelog

* Fix operator for comparing

* Fix return pos

* Fix eslint

* level 2

* Refactor for level2

* Update tests

* Remove concat

* If it fits on one line, print on one line

* Indent second level arg

* Break before last return value

* Use isCallLikeExpression

* Improve printing

* Add tests

* Remove unnecesary condition

* Fix lint problems

* Update src/language-js/utils.js

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>

* Update changelog

* Add ImportExpression

* Add ImportExpression to isCallLikeExpression

* Resolve conflicts

* Address reviews

* Fix ESLint problem

* Fix changelog

* Add tests

* More tests

* Print simple arrow chains on one line

* Don't forcibly break chain when a segment has a return type but no params

* Prevent excessive wrapping in assignments

* Simplify

* Format object bodies like blocks

* Update changelog

* Fix last arg expansion

* Simplify

* Fix arrow chains in assignment chains

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-03-08 23:18:53 +02:00
Georgii Dolzhykov 03a43ae55f Fix error thrown on expressions like a(b => c => function (){}) (#10278) 2021-02-09 11:08:14 +02:00
fisker Cheung 08e8b40ac6 Move non-js syntax test out of tests/js/ dir (#9023) 2020-08-22 14:50:54 +08:00
fisker Cheung 2c8b419837 Test: Fix parsers (#8278) 2020-05-12 19:21:47 +08:00
fisker Cheung b622578896 Categorize tests part 3 (js) (#8249)
* Categorize tests(js)
2020-05-08 00:55:46 +08:00