Skip to content

#each loop forces inline arrays onto single line #490

@janosh

Description

@janosh

if i remove the <!-- prettier-ignore -->, the 3 already long lines wrap onto a single line

<!-- prettier-ignore -->
{#each [
  { id: `x-axis`, label: `X Axis`, selected_prop: x_property, log_state: log_x, prop_value: x_property_value, has_neg_vals: x_has_neg_vals },
  { id: `y-axis`, label: `Y Axis`, selected_prop: y_property, log_state: log_y, prop_value: y_property_value, has_neg_vals: y_has_neg_vals },
  { id: `color-axis`, label: `Color`, selected_prop: color_property, log_state: log_color, prop_value: color_property_value, has_neg_vals: color_has_neg_vals },
] as obj}
  <!-- markup here -->
{/each}

expected behavior: same wrapping as in rest of component, i.e. based on line width exceeding prettier.printWidth (= 90 in my case)

slightly related: #117

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions