Rider Javascript code style
Hello,
Is there an option in the javascript code style to have a “return” in the same line as the “case” in a “switch” block?
There is just an option to indent “case” branches.
I would like to have the following format when the case contains a only a return:
switch {
case 1: return "a";
case 234: return "b";
default: return "c";
}
When I reformat the file, the “return” goes on the next line like this:
switch {
case 1:
return "a";
case 234:
return "b";
default:
return "c";
}
Thank you.
Please sign in to leave a comment.
There is no such a setting at the moment. Please vote for https://youtrack.jetbrains.com/issue/WEB-23817/Keep-on-one-line-Code-Style-for-Javascript-Switch-Case to be notified about updates.