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.

0

Please sign in to leave a comment.