Skip to content

Chained method calls not indented #1401

@xixixao

Description

@xixixao

I am not sure whether this is a duplicate of existing chaining bugs:

Input (within 80):

const segments = AdamPropertyCountrySegmentsStore.getItems(propertyID)
  .map(resultMap => resultMap.toList());

output:

const segments = AdamPropertyCountrySegmentsStore.getItems(
  propertyID,
).map(resultMap => resultMap.toList());

Not sure why the first call is split across lines when it doesn't violate line limit (is it because it's counting the .map( call as well?).

Relatedly, this (within 80):

const segments = AdamPropertyCountrySegmentsStore.getItems(propertyID, a, b)
  .map(resultMap => resultMap.toList());

formats as

const segments = AdamPropertyCountrySegmentsStore.getItems(
  propertyID,
  a,
  b,
).map(resultMap => resultMap.toList());

which is not so bad since there are multiple args, but I'd probably still prefer the input.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions