Formatting: inline function with multiple arguments
See original GitHub issuePrettier 1.15.1 Playground link
--parser babylon
Input:
function helloWorld() {
useEffect(() => {
// do something
}, [props.value])
}
Output:
function helloWorld() {
useEffect(
() => {
// do something
},
[props.value]
);
}
Expected behavior:
Like input. Output seems a bit excessive.
If this is intended, please close. Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:14 (7 by maintainers)
Top Results From Across the Web
How to format function definition with arguments on multiple ...
Try: constructor:\ ( @a , @b , @c ) ->. Both trailing \ and leading , suppress newlines in CoffeeScript.
Read more >Code Style: One argument per line in a multi-line function call
When splitting a function call over multiple lines, each parameter must be on a seperate line. Single line inline comments can take up...
Read more >Arrow function expressions - JavaScript - MDN Web Docs
An arrow function expression is a compact alternative to a traditional function expression, with some semantic differences and deliberate ...
Read more >Inline functions - Nintex help documentation
Represents a date time value in text of a specific format. Example. fn-FormatDate({WorkflowVariable:MyDate}, d). Arguments. Date A variable containing a date ...
Read more >Code formatting in C++ Part Three - Level of Indirection
If there are more than 16 variable declarations in a group then use single lines of whitespace to break them up. Try to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The inline version looks prettier to me
Feel free to open an issue or PR if this is important to you @ljharb.