Use of braceless arrow functions as function argument prevents "Method call arguments : Wrap always" to be applied
Here is my code style settings :

I expect this code :
b = iif(
() => this.a === 'new',
this.store.select(routerSelectors.selectQueryParam('parent')).pipe(),
of(null)
);
to be in this format.
However, when I format the code, I get this :
b = iif(() => this.a === 'new', this.store.select(routerSelectors.selectQueryParam('parent')).pipe(), of(null));
BUT if I add braces to the arrow function, I get the proper formatting :
b = iif(
() => {
return this.a === 'new';
},
this.store.select(routerSelectors.selectQueryParam('parent')).pipe(),
of(null)
);
Something prevents the wrapping of function arguments to be applied when one of these function argument is a braceless arrow function.
I couldn't see a relevant setting to fix this issue.
.editorconfig is not interfering with the settings, as disabling it has not effects.
Webstorm version : 2021.3.1
Please sign in to leave a comment.
works fine for me
May be, your expression is not long enough if braces and return; are not there, so the code doesn't exceed the right margin and thus not chopped?