I can not for the life of me find a formatter option to turn off automatic line breaks inside no-op function braces. The line breaks are added automatically for both arrow functions and regular functions. This is frustrating when for example passing no op functions to other functions (as a hook or callback), i.e. wrapWithCommonErrors(() => {})
.
function() {}
becomesfunction() {
}
() => {}
becomes() => {
}
Have you tried the Simple blocks in one line
option?
You can find it at
File
-> Settings
-> Code Style
-> JavaScript
-> Wrapping and Braces
-> Keep when reformatting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With