ReSharper 2021.1 Help

JavaScript - Other

Align multiline constructs

Method parameters

Property names:

[resharper_]js_align_multiline_parameter, [resharper_]align_multiline_parameter

Possible values:

true | false

Examples:

true
function foo(firstParameter, secondParameter) { }
false
function foo(firstParameter, secondParameter) { }

Multiple declarations

Property names:

[resharper_]js_align_multiple_declaration, [resharper_]align_multiple_declaration

Possible values:

true | false

Examples:

true
var variable = 0, variable_2 = 10;
false
var variable = 0, variable_2 = 10;

Align ?: operator

Property names:

[resharper_]js_align_ternary, [resharper_]align_ternary

Possible values:

  • align_all: Align

  • align_not_nested: Align except when nested

  • none: No align

Examples:

align_all
var variable = 56 + (condition1 ? result1 : condition2 ? result2 : result3);
align_not_nested
var variable = 56 + (condition1 ? result1 : condition2 ? result2 : result3);
none
var variable = 56 + (condition1 ? result1 : condition2 ? result2 : result3);

Other

Don't indent comments started at first column

Property names:

[resharper_]js_stick_comment, [resharper_]stick_comment

Possible values:

true | false

Examples:

Before formattingAfter formatting, true
function Foo(){ // Some comment var tt = 123; return tt; }
function Foo() { // Some comment var tt = 123; return tt; }
Before formattingAfter formatting, false
function Foo(){ // Some comment var tt = 123; return tt; }
function Foo() { // Some comment var tt = 123; return tt; }

Line feed at end of file

Property names:

insert_final_newline, [resharper_]js_insert_final_newline

Possible values:

true | false

Last modified: 08 March 2021