Commit Graph
18 Commits
Author SHA1 Message Date
Kevin Gibbons c03fcfedb1 Address parentheses bugs for edge cases with call and new (#6148) 2019-05-24 11:09:17 -03:00
Kevin Gibbons 1e471a0079 Add parentheses for immediately-constructed fn/class (#5996) 2019-03-28 21:06:39 +03:00
Kevin Gibbons cbcd24a5b2 Correct parentheses for mixed exp/mod (#5243)
Fixes #5238.

cc @duailibe for the [original change](https://github.com/prettier/prettier/pull/4413). I basically undid that PR because it didn't look to me like `shouldFlatten` made sense as the place to introduce the behavior it was going for, but I might have misunderstood something.
2018-10-12 12:33:47 -04:00
Kevin Gibbons 8e377a1e56 Add support for flow mixins when using babylon (#3391) 2017-12-05 08:58:14 +11:00
Kevin Gibbons f490dba609 switch a use of .map to .each (#2395) 2017-07-05 02:03:18 +02:00
Kevin Gibbons 28b3a4b925 Break sequence expressions (#2388)
* Add SequenceExpression tests

* Clean up printing of SequenceExpressions

* Remove test and lint
2017-07-04 22:50:57 +02:00
Kevin Gibbons 4915e0228e Require semicolons before class props named 'in' or 'instanceof' (#1878) 2017-06-02 10:52:11 -07:00
Kevin Gibbons e290514a9e Parenthesize new F(await a) and x[await a] correctly (#1513) 2017-05-05 08:10:56 -07:00
Kevin Gibbons 886f70fcdf Put loop bodies on the same line when possible (#1498) 2017-05-03 15:50:48 -07:00
Kevin Gibbons e75d3a4af3 Require '(a || b).c++' to have a preceding ; in no-semi style (#1443) 2017-04-27 14:00:53 -07:00
Kevin Gibbons 10a5f68a12 Require '::a.b' to have a preceding ; in no-semi style (#1442) 2017-04-27 14:00:04 -07:00
Kevin Gibbons 565106dd63 Add parentheses for assignment as body of arrow (#1326) 2017-04-18 13:28:33 -07:00
Kevin Gibbons dc2fa2cdd0 Fix #951: properly parenthesize ** expressions (#952) 2017-03-08 13:11:53 -08:00
Kevin Gibbons 7443f4cbd6 Parenthesize function expressions in expression position (#941)
* refactor needsParens for function expressions

* snapshots

* comment
2017-03-07 18:53:42 -08:00
Kevin Gibbons 06987e9948 cleanup needsParens (#935) 2017-03-07 14:43:05 -08:00
Kevin Gibbons a8ca2b21f4 Add semicolon to more default exports (#343) 2017-01-19 14:30:36 -08:00
Kevin Gibbons 18f54005f6 Do not unquote string properties 2017-01-11 09:31:34 -08:00
Kevin Gibbons be8f65d23e Format property names consistently 2017-01-10 22:29:54 -08:00