Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Incorrect formatting in fluent API call  #14675

Copy link
Copy link
@magnushiie

Description

@magnushiie
Issue body actions

TypeScript Version: 2.2.1

Code

Format the following code snippet using VS Code or typescript-formatter:

someVar
  .chain(
    'arg1',
    'arg2',
  )
  .chain(
    3,
    4,
  );

Expected behavior:

someVar
  .chain(
    'arg1',
    'arg2',
  )
  .chain(
    3,
    4,
  );

Actual behavior:

someVar
  .chain(
  'arg1',
  'arg2',
)
  .chain(
  3,
  4,
);

This is a common occurrence with fluent APIs (test frameworks, ORMs, etc) and tslint rules requiring trailing comma.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatter

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.