prettier/tests
Christopher Chedeau 5cc21c5498 Correctly place trailing comments in conditionals (#754)
Previously we would blindly put leading comments of the next expression, but we didn't account for a real trailing comment. By checking if the leadingNode is on the same line, we can correctly put it there when needed

Fixes #685
2017-02-20 20:25:30 -05:00
..
array_spread Move tests around (#454) 2017-01-24 14:35:37 -08:00
arrays [RFC] Preserve new lines between array elements (#707) 2017-02-15 20:52:28 -05:00
arrows Simplify arrow functions that use blocks (fixes #268) (#496) 2017-01-27 13:39:17 -05:00
async Remove extra parenthesis around await inside of unary expression (#745) 2017-02-20 09:14:33 -05:00
binary-expressions Align boolean inside of arrow functions (#691) 2017-02-15 20:00:02 -08: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 Do not put \n inside of empty object method bodies (#706) 2017-02-15 20:52:54 -05:00
comments Fix missing comments in assignment pattern (#704) 2017-02-20 07:39:08 -08:00
computed_props Move tests around (#454) 2017-01-24 14:35:37 -08:00
conditional Correctly place trailing comments in conditionals (#754) 2017-02-20 20:25:30 -05: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 Fix leading & operators in flow types (#738) 2017-02-20 07:18:39 -08: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
if_comments Stabilize comments inside of if/then/else before { (#672) 2017-02-13 09:55:54 -05:00
ignore [RFC] Introduce prettier-ignore-next (#671) 2017-02-13 21:58:50 -05: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] Don't add newline following newline (#690) 2017-02-14 13:41:51 -08: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
jsx_last_line Add option for putting > on the last line in jsx (#661) 2017-02-13 12:57:05 -05: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 Properly support member chains comments (#668) 2017-02-13 09:05:18 -08:00
new_expression Fix cases of missing parens with NewExpression (#230) 2017-01-15 23:56:40 -05:00
object-prop-break-in [RFC] Remove parenthesis object special case (#689) 2017-02-15 10:20:37 -05:00
object_colon_bug [RFC] Remove parenthesis object special case (#689) 2017-02-15 10:20:37 -05:00
objects Do not put \n inside of empty object method bodies (#706) 2017-02-15 20:52:54 -05: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 Make trailing-comma option support 2 different modes (#641) 2017-02-17 22:44:55 -05:00
shebang Do not put a newline on empty `{}` for functions (#447) 2017-01-24 12:37:01 -05:00
strings [RFC] Preserve new lines between array elements (#707) 2017-02-15 20:52:28 -05: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 Make trailing-comma option support 2 different modes (#641) 2017-02-17 22:44:55 -05: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 Fix Flow union type annotations indentation (#650) 2017-02-13 09:03:56 -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