Skip to content

fluent api style method chain formatting problem #5830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zpdDG4gta8XKpMCd opened this issue Nov 30, 2015 · 2 comments · Fixed by #28340
Closed

fluent api style method chain formatting problem #5830

zpdDG4gta8XKpMCd opened this issue Nov 30, 2015 · 2 comments · Fixed by #28340
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@zpdDG4gta8XKpMCd
Copy link

Seen in 1.8 nightly build (1.8.0-dev.20151130)

// given:
new Start()
   .then(
      true,
      false
   ).then(
      1234,
      'xyz'
   ).then(
      'abc',
      '987'
   );
// actual:
new Start()
   .then(
   true,
   false
   ).then(
   1234,
   'xyz'
   ).then(
   'abc',
   '987'
   );
// expected:
new Start()
   .then(
      true,
      false
   ).then(
      1234,
      'xyz'
   ).then(
      'abc',
      '987'
   );
@zpdDG4gta8XKpMCd zpdDG4gta8XKpMCd changed the title fluent api style method chain formatted fluent api style method chain formatting problem Nov 30, 2015
@mhegazy mhegazy added Bug A bug in TypeScript Help Wanted You can do this labels Dec 1, 2015
@mhegazy mhegazy added this to the Community milestone Dec 1, 2015
@mhegazy mhegazy added Help Wanted You can do this and removed Help Wanted You can do this labels Feb 20, 2016
@magnushiie
Copy link
Contributor

Note that as described in #14675, a trailing comma causes a different (although still incorrect indentation currently):

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

@DanielRosenwasser
Copy link
Member

Thanks @saschanaz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
4 participants