ReSharper 2023.1 Help

EditorConfig properties for JavaScript: Tabs and Indents

Tabs and indents

Indent style

Property names:

indent_style, [resharper_]js_indent_style

Possible values:

  • tab: Tab

  • space: Spaces

Examples:

tab

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

space

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

Indent size

Property names:

indent_size, [resharper_]js_indent_size

Possible values:

an integer

Examples:

value: 0

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

value: 1

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

value: 2

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

Tab width

Property names:

tab_width, [resharper_]js_tab_width

Possible values:

an integer

Examples:

value: 0

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

value: 1

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

value: 2

if (condition) { if (condition1) { foo1(); foo2(); } else { foo3(); foo4(); } }

How to align when tabs are used for indents

Property names:

[resharper_]js_alignment_tab_fill_style, [resharper_]alignment_tab_fill_style

Possible values:

  • use_spaces: Use spaces (looks aligned on any tab size)

  • use_tabs_only: Only use tabs (inaccurate)

  • optimal_fill: Mix tabs and spaces for optimal fill

Align even if the resulting indentation is too large

Property names:

[resharper_]js_allow_far_alignment, [resharper_]allow_far_alignment

Allow alignment even if construct is located too far to the right, more than 2/3 of `Hard wrap at` limit

Possible values:

true | false

Last modified: 27 March 2023