EditorConfig properties for JavaScript: Braces Layout
tip
Formatting preferences listed on this page can be also configured visually, on the Code Editing | JavaScript | Formatting Style | Braces Layout page of ReSharper options Alt+R, O.
[resharper_]js_empty_block_style
, [resharper_]empty_block_style
multiline
: On different linestogether
: Place braces togethertogether_same_line
: Together on the same line
Before formatting | After formatting, multiline |
---|---|
|
|
Before formatting | After formatting, together |
---|---|
|
|
Before formatting | After formatting, together_same_line |
---|---|
|
|
[resharper_]js_function_braces
, [resharper_]js_brace_style
, [resharper_]function_braces
, [resharper_]brace_style
end_of_line
: At the end of line (K&R style)end_of_line_no_space
: At the end of line (no space)next_line
: At next line (BSD style)next_line_shifted
: At next line indented (Whitesmiths style)next_line_shifted_2
: At next line indented 2 (GNU style)pico
: Compact (Pico style)
end_of_line |
---|
|
end_of_line_no_space |
---|
|
next_line |
---|
|
next_line_shifted |
---|
|
next_line_shifted_2 |
---|
|
pico |
---|
|
[resharper_]js_function_in_invocation_braces
, [resharper_]js_brace_style
, [resharper_]function_in_invocation_braces
, [resharper_]brace_style
end_of_line
: At the end of line (K&R style)end_of_line_no_space
: At the end of line (no space)next_line
: At next line (BSD style)next_line_shifted
: At next line indented (Whitesmiths style)next_line_shifted_2
: At next line indented 2 (GNU style)pico
: Compact (Pico style)
end_of_line |
---|
|
end_of_line_no_space |
---|
|
next_line |
---|
|
next_line_shifted |
---|
|
next_line_shifted_2 |
---|
|
pico |
---|
|
[resharper_]js_control_statements_braces
, [resharper_]js_brace_style
, [resharper_]control_statements_braces
, [resharper_]brace_style
end_of_line
: At the end of line (K&R style)end_of_line_no_space
: At the end of line (no space)next_line
: At next line (BSD style)next_line_shifted
: At next line indented (Whitesmiths style)next_line_shifted_2
: At next line indented 2 (GNU style)pico
: Compact (Pico style)
end_of_line |
---|
|
end_of_line_no_space |
---|
|
next_line |
---|
|
next_line_shifted |
---|
|
next_line_shifted_2 |
---|
|
pico |
---|
|
[resharper_]js_indent_pars
, [resharper_]indent_pars
inside
: Inside parenthesis (BSD/K&R style)outside
: Parenthesis and inside equally (Whitesmiths style)outside_and_inside
: Parenthesis 1x, inside 2x (GNU style)none
: No indent
inside |
---|
|
outside |
---|
|
outside_and_inside |
---|
|
none |
---|
|
[resharper_]js_force_control_statements_braces
, [resharper_]force_control_statements_braces
do_not_change
: Do not changealways_remove
: Remove bracesalways_add
: Add bracesonly_for_multiline
: Use braces for multiline
Before formatting | After formatting, do_not_change |
---|---|
|
|
Before formatting | After formatting, always_remove |
---|---|
|
|
Before formatting | After formatting, always_add |
---|---|
|
|
Before formatting | After formatting, only_for_multiline |
---|---|
|
|
[resharper_]js_indent_switch_labels
, [resharper_]indent_switch_labels
true | false
true |
---|
|
false |
---|
|