es-beautifier icon indicating copy to clipboard operation
es-beautifier copied to clipboard

chained function call is not beautified

Open dai-shi opened this issue 8 years ago • 1 comments

Given the code:

funcAAAAAAAAAAAA1().funcAAAAAAAAAAAA2().funcAAAAAAAAAAAA3().funcAAAAAAAAAAAA4().funcAAAAAAAAAAAA5().funcAAAAAAAAAAAA6();

Expected:

funcAAAAAAAAAAAA1() 
  .funcAAAAAAAAAAAA2()
  .funcAAAAAAAAAAAA3()
  .funcAAAAAAAAAAAA4()
  .funcAAAAAAAAAAAA5()
  .funcAAAAAAAAAAAA6();

dai-shi avatar Dec 16 '16 22:12 dai-shi

There's a rule http://eslint.org/docs/rules/newline-per-chained-call, but it's' not fixable.

dai-shi avatar Dec 16 '16 23:12 dai-shi