prettier/tests
Christopher Chedeau 8d03423d17 Avoid breaking arguments for last arg expansion (#1305)
We've had this issue since the beginning and I tagged it as 1.0 but haven't managed to fix it by then. We shouldn't allow things to break in the argument list if we are in the last argument expansion mode. It turns out that we now have all the building blocks needed to fix this:
- have a special way to flag when we are printing the last argument expansion in the code that prints the argument list
- have a way to remove all the softlines from the argument list

Fixes #1301
2017-04-18 08:40:08 -07:00
..
array_spread Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
arrays Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
arrow-call Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
arrows Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
assignment Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
assignment_comments Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
assignment_expression Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
async Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
binary-expressions Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
binary_math Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
bracketSpacing Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
break-calls Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
class_comment Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
class_extends Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
classes Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
comments Preserve comment for last arg of ObjectMethod (#1216) 2017-04-12 16:32:04 -07:00
computed_props Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
conditional Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
decorators Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
directives Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
do Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
dynamic_import Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
empty_paren_comment Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
empty_statement Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
es6modules Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
exact_object Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
export Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
export_default Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
export_extension Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
exports Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
expression_statement Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
first_argument_expansion Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow Get rid of fixFaultyLocations code (#1252) 2017-04-13 18:32:03 -07:00
flow_array_comments Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow_array_union Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow_comments Stabilize comments on ObjectTypeAnnotation (#1214) 2017-04-12 14:13:34 -07:00
flow_function_parentheses Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow_generic Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow_import_type_specifier Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow_method Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow_object_comment Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
flow_return_arrow Fix flow union params (#1251) 2017-04-13 17:54:20 -07:00
for Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
function Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
function_single_destructuring Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
if Fix own line last if comment (#1219) 2017-04-12 17:26:44 -07:00
ignore Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
import Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
interface Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
intersection Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
jsx Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
jsx-multiline-assign Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
jsx-newlines Ensure JSXOpeningElement does not break with single text attr on Babylon (#1229) 2017-04-13 07:09:40 -07:00
jsx-significant-space Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
jsx-split-attrs Ensure JSXOpeningElement does not break with single text attr on Babylon (#1229) 2017-04-13 07:09:40 -07:00
jsx-stateless-arrow-fn Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
jsx_escape Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
jsx_last_line Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
jsx_template Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
label Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
last_argument_expansion Avoid breaking arguments for last arg expansion (#1305) 2017-04-18 08:40:08 -07:00
line Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
line_suffix_boundary Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
literal Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
member Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
method-chain Do not inline member expressions as part of assignments (#1256) 2017-04-13 20:09:00 -04:00
new_expression Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
newline Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
no-semi [WIP] no-semi comments (#1257) 2017-04-13 18:33:46 -07:00
object-prop-break-in Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
object_colon_bug Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
object_property_comment Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
objects Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
optional-type-name Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
performance Bail when traversing === groups (#1294) 2017-04-18 08:39:47 -07:00
preserve_line Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
quotes Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
require Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
rest Fix trailing comma for rest element in Babylon (#1230) 2017-04-13 07:10:08 -07:00
return Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
shebang Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
strings Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
switch Fix isPreviousLineEmpry on Windows (#1263) 2017-04-14 16:02:19 -07:00
tabWith Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
template Fix template literal comments (#1296) 2017-04-17 11:35:12 -04:00
ternaries Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
test_declarations Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
trailing_comma Fix function trailing comment location (#1195) 2017-04-12 14:18:29 -07:00
trailing_whitespace Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
try Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
typescript/conformance/types Remove trailing whitespace (#1259) 2017-04-13 18:31:49 -07:00
unary Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
unary_expression Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
unicode Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
union_intersection Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
update_expression Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
variable_declarator Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
while Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
windows Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00
yield Prittier printing of snapshots (#1190) 2017-04-12 13:41:51 -07:00