Ability to not add line breaks in no-op (empty) functions in JavaScript (IntelliJ Web / PHP storm)

I cannot find a formatting option during my lifetime to disable automatic line breaks inside curly braces of a function. Line breaks are automatically added for both arrow functions and regular functions. This is frustrating when, for example, passing any operational functions to other functions (like a hook or callback), i.e. wrapWithCommonErrors(() => {}).

function() {} becomes
function() { }

() => {} becomes
() => { }

+4
source share
1 answer

Have you tried the option Simple blocks in one line?

You can find it on

FileSettingsCode StyleJavaScriptWrapping and BracesKeep when reformatting

+5

All Articles