prettier/tests
Christopher Chedeau 76e599ec97 Avoid unneeded parenthesis for colon with comments (#673)
Because the group was too high up, the comment would be taken into consideration to determine the size and it would break and add parenthesis. Adding a group where we actually want the ifBreak seems to be passing all the existing tests and fixes this edge case.

Fixes #655
2017-02-13 09:55:09 -05:00
..
array_spread Move tests around (#454) 2017-01-24 14:35:37 -08:00
arrays Move tests around (#454) 2017-01-24 14:35:37 -08:00
arrows Simplify arrow functions that use blocks (fixes #268) (#496) 2017-01-27 13:39:17 -05:00
async Move tests around (#454) 2017-01-24 14:35:37 -08:00
binary-expressions Put short elements at right of single binary expression on same line (#605) 2017-02-09 10:44:03 -05:00
bracketSpacing Fix range for object newline detection (#520) 2017-01-30 09:54:19 -08:00
break-calls Break nested calls (#517) 2017-01-31 11:45:47 -05:00
class_extends Do not put a newline on empty `{}` for functions (#447) 2017-01-24 12:37:01 -05:00
classes Remove the concept of globalPrecedingNode (#561) 2017-02-03 13:56:06 -08:00
comments Fix dangling comments for arrays (#665) 2017-02-12 23:09:39 -05:00
computed_props Move tests around (#454) 2017-01-24 14:35:37 -08:00
decorators Put decorators on the same line (#459) 2017-01-25 16:30:09 -05:00
directives Remove last trailing line for directives-only files (#609) 2017-02-07 10:39:04 -05:00
dynamic_import Support printing import("a") (#458) 2017-01-25 07:33:48 -08:00
empty_statement Make sure empty for loops generate valid code (#224) 2017-01-16 12:54:39 -05:00
es6modules Move tests around (#454) 2017-01-24 14:35:37 -08:00
export Fix bracketSpacing typo in tests (#299) 2017-01-18 12:22:12 -08:00
export_default Move tests around (#454) 2017-01-24 14:35:37 -08:00
export_extension Fix export extension output (#361) 2017-01-20 19:20:31 -08:00
exports Move tests around (#454) 2017-01-24 14:35:37 -08:00
expression_statement Remove last trailing line for directives-only files (#609) 2017-02-07 10:39:04 -05:00
flow Preserve blank lines inside of objects (#606) 2017-02-09 11:08:58 -05:00
flow_comments Add parenthesis around single argument arrow if comments (#573) 2017-02-03 16:14:40 -05:00
flow_method Use arrow function when inputted that way for flow objects (#608) 2017-02-04 21:23:37 -05:00
for Added parens around in operator in for loops 🚀. (#468) 2017-01-25 14:24:25 -08:00
function Move tests around (#454) 2017-01-24 14:35:37 -08:00
import Break long imports (#590) 2017-02-03 16:19:14 -05:00
interface Fix range for object newline detection (#520) 2017-01-30 09:54:19 -08:00
jsx 565 jsx parentheses fix (#580) 2017-02-02 16:25:34 -08:00
jsx-multiline-assign Move tests around (#454) 2017-01-24 14:35:37 -08:00
jsx-newlines [JSX] Fix spurious newline (fixes #614) (#628) 2017-02-07 09:58:25 -05:00
jsx-significant-space [JSX] jsx-whitespace breaks with parent (fixes #622) (#626) 2017-02-07 13:47:34 -05:00
jsx-split-attrs Don't break up JSXOpeningElement if it only has a single text attribute (#488) 2017-01-26 17:22:56 -05:00
jsx-stateless-arrow-fn Indent ternaries (#484) 2017-01-26 11:58:40 -08:00
jsx_escape [JSX] Handle non-breaking space (#557) 2017-02-01 15:29:42 -08:00
label Fix empty labels (#383) 2017-01-22 12:34:27 -08:00
last_argument_expansion Print CallExpression comments inside of memberChain (#600) 2017-02-04 21:31:54 -05:00
line Move tests around (#454) 2017-01-24 14:35:37 -08:00
literal Revert "Print \x and \u escapes in strings and regexes lowercase (#522)" (#574) 2017-02-02 09:54:10 -08:00
member Indent computed member (#471) 2017-01-26 14:58:47 -05:00
method-chain Make all the member expressions but the last one part of the first group (#589) 2017-02-03 16:18:54 -05:00
new_expression Fix cases of missing parens with NewExpression (#230) 2017-01-15 23:56:40 -05:00
object-prop-break-in Avoid unneeded parenthesis for colon with comments (#673) 2017-02-13 09:55:09 -05:00
object_colon_bug Remove extra group when printing object values (#502) 2017-01-30 10:03:40 -05:00
objects Fix range for object newline detection (#520) 2017-01-30 09:54:19 -08:00
optional-type-name Fix range for object newline detection (#520) 2017-01-30 09:54:19 -08:00
preserve_line Preserve next line with trailing comment (#535) 2017-01-31 11:27:44 -05:00
quotes Refactor comment algorithm and improve newline/spaces detection (fixes #483, #275, #135, #78, #36) (#482) 2017-01-26 11:57:43 -08:00
rest Don't print trailing commas for object destructuring and rest (#512) 2017-01-30 10:07:03 -05:00
shebang Do not put a newline on empty `{}` for functions (#447) 2017-01-24 12:37:01 -05:00
strings Revert "Print \x and \u escapes in strings and regexes lowercase (#522)" (#574) 2017-02-02 09:54:10 -08:00
switch Move tests around (#454) 2017-01-24 14:35:37 -08:00
tabWith Do not put a newline on empty `{}` for functions (#447) 2017-01-24 12:37:01 -05:00
template Move tests around (#454) 2017-01-24 14:35:37 -08:00
ternaries Fix ternary indent bug (#577) 2017-02-02 10:37:59 -08:00
trailing_comma [RFC] Keep expanded objects expanded (#495) 2017-01-30 09:08:55 -08:00
trailing_whitespace Remove `multilineGroup` (#450) 2017-01-24 13:54:01 -05:00
unary Whitelist UnaryExpression for parentless objects (#545) 2017-02-01 16:24:22 -08:00
unary_expression Move tests around (#454) 2017-01-24 14:35:37 -08:00
unicode Remove last trailing line for directives-only files (#609) 2017-02-07 10:39:04 -05:00
union_intersection Move tests around (#454) 2017-01-24 14:35:37 -08:00
update_expression Fix some parens cases for UpdateExpressions (#381) 2017-01-21 20:14:22 -08:00
while Do not indent binary expressions inside of if (#604) 2017-02-09 10:36:05 -05:00
windows Maintain windows line ending (#472) 2017-01-26 14:16:42 -08:00
yield Proper parenthesis for yield and await in conditional (#436) 2017-01-23 10:25:38 -08:00