question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple function argument doesn't break lines anymore

See original GitHub issue

Summary

This plugin used to format function arguments split after 2, now it doesn’t after the latest update

Github Repository to Reproduce Issue

https://github.com/luchillo17/prettier-vscode-errors

Steps To Reproduce:

  1. Clone repo.
  2. Run npm i.
  3. Open & format file multiline-format-issue.ts

Expected result

Check the red part in the following image, that was before the update

Actual result

Check the green part, that’s current result and is re-formatting everywhere in my code, it’s harder to read, off course those 3 functions will never reach 80 width.

image

Additional information

VS Code Version: 1.40.1

Prettier Extension Version: 3.9.0

OS and version: Win 10 1909

Prettier Log Output

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
luchillo17commented, Nov 28, 2019

Finally found it, the version it used to work was prettier@1.18.2, @urdarinda you can get the old behavior installing this exact version in your project directly.

0reactions
github-actions[bot]commented, Apr 12, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple function argument doesn't break lines anymore #1095
Multiple function argument doesn't break lines anymore #1095 ... This plugin used to format function arguments split after 2, now it doesn't ...
Read more >
Is it a bad idea to list every function/method argument on a ...
I see both on calls. If the parameter list is too long, it should be broken across multiple lines. If the parameters don't...
Read more >
How many parameters are too many? [closed] - Stack Overflow
Depending on what your method is doing, or what the class is supposed to represent, it's quite possible that 2 arguments is too...
Read more >
Code Style: One argument per line in a multi-line function call
WI-70310 Shortcut to break arguments to multiple lines while writing a call. ... For both Function declaration parameters and Function/constructor call ...
Read more >
TEXTSPLIT function - Microsoft Support
Splits text strings by using column and row delimiters. The TEXTSPLIT function works the same as the Text-to-Columns wizard, but in formula form....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found