JavaScript - Braces Layout
Braces layout
Empty braces formatting
Property names:
[resharper_]js_empty_block_style
, [resharper_]empty_block_style
Possible values:
-
together_same_line
: Together on the same line -
together
: Place braces together -
multiline
: On different lines
Examples:
Function
Property names:
[resharper_]js_function_braces
, [resharper_]js_brace_style
, [resharper_]function_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Functions passed as parameters to other function calls
Property names:
[resharper_]js_function_in_invocation_braces
, [resharper_]js_brace_style
, [resharper_]function_in_invocation_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Control statements
Property names:
[resharper_]js_control_statements_braces
, [resharper_]js_brace_style
, [resharper_]control_statements_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Indent parenthesis, brackets and expression braces
Property names:
[resharper_]js_indent_pars
, [resharper_]indent_pars
Possible values:
-
outside_and_inside
: Parenthesis 1x, inside 2x (GNU style) -
none
: No indent -
inside
: Inside parenthesis (BSD/K&R style) -
outside
: Parenthesis and inside equally (Whitesmiths style)
Examples:
Force braces
Braces in statements
Property names:
[resharper_]js_force_control_statements_braces
, [resharper_]force_control_statements_braces
Possible values:
-
always_add
: Add braces -
only_for_multiline
: Use braces for multiline -
do_not_change
: Do not change -
always_remove
: Remove braces
Examples:
Case statement
Indent "case" from "switch"
Property names:
[resharper_]js_indent_switch_labels
, [resharper_]indent_switch_labels
Possible values:
true | false
Examples:
Last modified: 11 October 2017