Closed sabrehagen closed 5 years ago
Hi,
Good question. When manipulating the code, the extension tries to preserve the existing formatting but it isn't possible in some cases. For these situations, default formatting options are applied, which is basically what happens in the case that you mention.
These default formatting options are hardcoded now but could be easily exposed via extension settings. I'll publish an updated version soon and it will fix the problem. You'll just have to set arrowParensAlways: true
to adjust the behavior.
Also, I would recommend using Prettier to preserve code style automatically. When configured to format on save, such formatting issues become barely noticable imo.
Cheers!
Fixed with the option javascriptBooster.formattingOptions
in v0.11.0.
When executing
Add braces to arrow function statement
onit yields
How can I configure the plugin to also apply
Wrap parameter with ()
in the same operation to producewith only one code action?