Commit Graph

5 Commits (7f68db8e88adc951b996490a7e16a8aea6faa76a)

Author SHA1 Message Date
Sosuke Suzuki 7f68db8e88 JavaScript: arguments with object contains newline in arrow function (#6382)
* Modify to fix arguments with object contains newline in arrow function(nested)

* Update CHANGELOG.unreleased.md

* Update tests

* Modify to refactor

* Modify to refactor

* Add pr number and link

* Update CHANGELOG.unreleased.md

* Modify to remove unnecessary null checking

* Fix for ArrayPattern

* Fix for RestElement

* Fix for AssignmentPattern

* Update tests

* Fix for nested array and object

* Update tests

* Fix for nested array pattern

* Update tests

* Modify to discard unnecessary node type check

* Fix for rest element

* Fix for array in rest

* Fix for array in assignment pattern

* Update tests

* Fix for CallExpression with Assignment

* Fix for ArrowFunction with AssignmentPattern

* Update tests

* Modify to support generally pattern

* Update tests

* Modify to use path.each instead of path.map

* Fix for multi arguments

* Fix typo, Argments => Arguments
2019-10-22 16:05:10 +03:00
Sosuke Suzuki ce366f0834 fix(JavaScript): bug when arrow fn as function parameter with newline (#6301) 2019-08-08 16:06:28 +03:00
Christopher Chedeau 449bc41316 Use expandLast for nested arrow functions (#1720)
We don't always want to automatically forward this option but we can always forward it to `n.body`. If it's an arrow function, it's doing the intended behavior, otherwise, it's not going to ignore it and not forward it. What we don't want is for arrow -> blockStatement -> arrow to get it, but we're good.

Fixes #1652
2017-05-24 18:19:07 -07:00
Christopher Chedeau dc52a71923 Inline class expressions for bracket-less arrow functions (#1023)
I could go either way but it doesn't seem a big deal to inline them. I don't expect it to be very common anyway

Fixes #990
2017-03-17 14:01:17 -04:00
Christopher Chedeau d39facc022 Only allow same-line arrow-less body for explicit nodes (#966)
In practice, trying to allow calls to be inlined is causing a lot of code to look very weird and unstable as seen by the four issues this is fixing. It also requires us to add a conditional group and do hackery around it.

Fixes #959
Fixes #760
Fixes #615
Fixes #625
2017-03-09 09:08:12 -08:00