ReSharper 2017.1 Help

JavaScript - Spaces

Comma

After comma

Property names:

[resharper_]js_space_after_comma, [resharper_]space_after_comma

Possible values:

true | false

Examples:

true
foo(abc);
false
foo(a,b,c);

Before comma

Property names:

[resharper_]js_space_before_comma, [resharper_]space_before_comma

Possible values:

true | false

Examples:

true
foo(c);
false
foo(abc);

Semicolon

Before semicolon

Property names:

[resharper_]js_space_before_semicolon, [resharper_]space_before_semicolon

Possible values:

true | false

Examples:

true
foo(abc;
false
foo(abc);

Before semicolon in for statement

Property names:

[resharper_]js_space_before_semicolon_in_for_statement, [resharper_]space_before_semicolon_in_for_statement

Possible values:

true | false

Examples:

true
for·(var·10·i++)·{ }
false
for·(var·110i++)·{ }

After semicolon in for statement

Property names:

[resharper_]js_space_after_semicolon_in_for_statement, [resharper_]space_after_semicolon_in_for_statement

Possible values:

true | false

Examples:

true
for·(var·110i++)·{ }
false
for·(var·1;10;i++)·{ }

In function invocations

Before parentheses

Property names:

[resharper_]js_space_before_method_call_parentheses, [resharper_]js_space_between_method_call_name_and_opening_parenthesis, [resharper_]space_before_method_call_parentheses, [resharper_]space_between_method_call_name_and_opening_parenthesis

Possible values:

true | false

Examples:

true
foo·(abc);
false
foo(abc);

Before empty parentheses

Property names:

[resharper_]js_space_before_empty_method_call_parentheses, [resharper_]js_space_between_method_call_name_and_opening_parenthesis, [resharper_]space_before_empty_method_call_parentheses, [resharper_]space_between_method_call_name_and_opening_parenthesis

Possible values:

true | false

Examples:

true
foo·();
false
foo();

Within parentheses

Property names:

[resharper_]js_space_between_method_call_parameter_list_parentheses, [resharper_]space_between_method_call_parameter_list_parentheses

Possible values:

true | false

Examples:

true
fooab);
false
foo(abc);

Within empty parentheses

Property names:

[resharper_]js_space_between_method_call_empty_parameter_list_parentheses, [resharper_]space_between_method_call_empty_parameter_list_parentheses

Possible values:

true | false

Examples:

true
foo);
false
foo();

In function declarations

Before parentheses

Property names:

[resharper_]js_space_before_method_parentheses, [resharper_]js_space_between_method_declaration_name_and_open_parenthesis, [resharper_]space_before_method_parentheses, [resharper_]space_between_method_declaration_name_and_open_parenthesis

Possible values:

true | false

Examples:

true
function·Foo·(ab{}
false
function·Foo(ab{}

Before parentheses of anonymous method

Property names:

[resharper_]js_space_before_method_parentheses_anonymous, [resharper_]js_space_between_method_declaration_name_and_open_parenthesis, [resharper_]space_before_method_parentheses_anonymous, [resharper_]space_between_method_declaration_name_and_open_parenthesis

Possible values:

true | false

Examples:

true
function·(ab{}
false
function(ab{}

Within empty parentheses

Property names:

[resharper_]js_space_between_method_declaration_empty_parameter_list_parentheses, [resharper_]space_between_method_declaration_empty_parameter_list_parentheses

Possible values:

true | false

Examples:

true
function·Foo{}
false
function·Foo()·{}

Within parentheses

Property names:

[resharper_]js_space_between_method_declaration_parameter_list_parentheses, [resharper_]space_between_method_declaration_parameter_list_parentheses

Possible values:

true | false

Examples:

true
function·Fooa{}
false
function·Foo(ab{}

In control statements

Before parentheses

Property names:

[resharper_]js_space_after_keywords_in_control_flow_statements, [resharper_]space_after_keywords_in_control_flow_statements

Possible values:

true | false

Examples:

true
while·(condition{ }
false
while(condition{ }

Within parentheses

Property names:

[resharper_]js_space_between_parentheses_of_control_flow_statements, [resharper_]space_between_parentheses_of_control_flow_statements

Possible values:

true | false

Examples:

true
do·{ while·condition·)
false
do·{ while·(condition)

In index expressions

Before brackets

Property names:

[resharper_]js_space_before_array_access_brackets, [resharper_]js_space_before_open_square_brackets, [resharper_]space_before_array_access_brackets, [resharper_]space_before_open_square_brackets

Possible values:

true | false

Examples:

true
[i]
false
a[i]

Within brackets

Property names:

[resharper_]js_space_within_array_access_brackets, [resharper_]js_space_between_square_brackets, [resharper_]space_within_array_access_brackets, [resharper_]space_between_square_brackets

Possible values:

true | false

Examples:

true
a]
false
a[i]

In ternary operator '? :'

In ternary operator '? :'

Property names:

[resharper_]js_space_before_ternary_quest, [resharper_]space_before_ternary_quest

Possible values:

true | false

Examples:

true
c
false
ac

After '?'

Property names:

[resharper_]js_space_after_ternary_quest, [resharper_]space_after_ternary_quest

Possible values:

true | false

Examples:

true
c
false
?c

Before ':'

Property names:

[resharper_]js_space_before_ternary_colon, [resharper_]space_before_ternary_colon

Possible values:

true | false

Examples:

true
c
false
bc

After ':'

Property names:

[resharper_]js_space_after_ternary_colon, [resharper_]space_after_ternary_colon

Possible values:

true | false

Examples:

true
c
false
:c

In object expression

Before ':'

Property names:

[resharper_]js_space_before_property_colon, [resharper_]space_before_property_colon

Possible values:

true | false

Examples:

true
var·}
false
var·a}

After ':'

Property names:

[resharper_]js_space_after_property_colon, [resharper_]space_after_property_colon

Possible values:

true | false

Examples:

true
var·a}
false
var·a:}

Within braces

Property names:

[resharper_]js_space_within_object_literal_braces, [resharper_]space_within_object_literal_braces

Possible values:

true | false

Examples:

true
var·a}
false
var·{ab}

Within empty braces

Property names:

[resharper_]js_space_within_empty_object_literal_braces, [resharper_]space_within_empty_object_literal_braces

Possible values:

true | false

Examples:

true
var·}
false
var·{}

In expressions

Around binary operator

Property names:

[resharper_]js_space_around_binary_operator, [resharper_]space_around_binary_operator

Possible values:

true | false

Examples:

true
b
false
a+b

Around assignment operator

Property names:

[resharper_]js_space_around_assignment_operator, [resharper_]space_around_assignment_operator

Possible values:

true | false

Examples:

true
b;
false
a=b;

Around dot

Property names:

[resharper_]js_space_around_dot, [resharper_]js_space_around_member_access_operator, [resharper_]space_around_dot, [resharper_]space_around_member_access_operator

Possible values:

true | false

Examples:

true
obj·toString()
false
obj.toString()

Within parentheses

Property names:

[resharper_]js_space_within_parentheses, [resharper_]space_within_parentheses

Possible values:

true | false

Examples:

true
).toString();
false
(b).toString();

Case statement

Before colon

Property names:

[resharper_]js_space_before_colon_in_case, [resharper_]space_before_colon_in_case

Possible values:

true | false

Examples:

true
switch·(a{ case·: ··break; }
false
switch·(a{ case·b: ··break; }

Lambdas

Before '=>'

Property names:

[resharper_]js_space_before_arrow, [resharper_]space_before_arrow

Possible values:

true | false

Examples:

true
var·(abc=>·c;
false
var·(abc)=>·c;

After '=>' in lambda expressions

Property names:

[resharper_]js_space_after_arrow, [resharper_]space_after_arrow

Possible values:

true | false

Examples:

true
var·(abc=>·c;
false
var·(abc=>c;

Template literals

Within braces around template argument

Property names:

[resharper_]js_space_within_template_argument, [resharper_]space_within_template_argument

Possible values:

true | false

Examples:

true
var·`$$}`
false
var·`${a${y}`
Last modified: 12 October 2017