ReSharper 2024.2 Help

EditorConfig properties for TypeScript: Line Breaks

Blank lines

Min blank lines around fields and signature declarations

Property names:

[resharper_]js_min_blank_lines_around_fields, [resharper_]min_blank_lines_around_fields

Possible values:

an integer

Examples:

Before formatting

After formatting, value: 0

class C { public f1: number; public f2: number; }
class C { public f1: number; public f2: number; }

Before formatting

After formatting, value: 1

class C { public f1: number; public f2: number; }
class C { public f1: number; public f2: number; }

Before formatting

After formatting, value: 2

class C { public f1: number; public f2: number; }
class C { public f1: number; public f2: number; }

Min blank lines around types and modules

Property names:

[resharper_]js_min_blank_lines_around_types, [resharper_]min_blank_lines_around_types

Possible values:

an integer

Examples:

Before formatting

After formatting, value: 0

class C1 { public f: number; } class C2 { public f: number; }
class C1 { public f: number; } class C2 { public f: number; }

Before formatting

After formatting, value: 1

class C1 { public f: number; } class C2 { public f: number; }
class C1 { public f: number; } class C2 { public f: number; }

Before formatting

After formatting, value: 2

class C1 { public f: number; } class C2 { public f: number; }
class C1 { public f: number; } class C2 { public f: number; }

Line breaks

Enumerations

Property names:

[resharper_]js_wrap_enum_style, [resharper_]wrap_enum_style

Possible values:

  • do_not_change: Do not change

  • on_single_line: Force put on single line

  • line_break: Force line breaks

Examples:

Before formatting

After formatting, do_not_change

enum A { A1, A2, A3 } enum B { B1, B2, B3, }
enum A { A1, A2, A3 } enum B { B1, B2, B3, }

Before formatting

After formatting, on_single_line

enum A { A1, A2, A3 } enum B { B1, B2, B3, }
enum A { A1, A2, A3 } enum B { B1, B2, B3, }

Before formatting

After formatting, line_break

enum A { A1, A2, A3 } enum B { B1, B2, B3, }
enum A { A1, A2, A3 } enum B { B1, B2, B3, }

Wrapping and chopping

Wrap union type usage

Property names:

[resharper_]js_wrap_union_type_usage, [resharper_]wrap_union_type_usage

Possible values:

  • wrap_if_long: Simple wrap

  • chop_if_long: Chop if long or multiline

  • chop_always: Chop always

Examples:

Before formatting

After formatting, wrap_if_long

type A = 'first' | 'second' | 'third'; type B = 'x' | 'y' | 'z'; type C = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
type A = 'first' | 'second' | 'third'; type B = 'x' | 'y' | 'z'; type C = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';

Before formatting

After formatting, chop_if_long

type A = 'first' | 'second' | 'third'; type B = 'x' | 'y' | 'z'; type C = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
type A = 'first' | 'second' | 'third'; type B = 'x' | 'y' | 'z'; type C = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';

Before formatting

After formatting, chop_always

type A = 'first' | 'second' | 'third'; type B = 'x' | 'y' | 'z'; type C = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
type A = 'first' | 'second' | 'third'; type B = 'x' | 'y' | 'z'; type C = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';

Place on a new line

Place each decorator on a new line

Property names:

[resharper_]js_place_each_decorator_on_new_line, [resharper_]place_each_decorator_on_new_line

Possible values:

true | false

Examples:

true

@test class A { @test @custom m() { } };

false

@test class A { @test @custom m() { } };

Class decorators on the same line with class

Property names:

[resharper_]js_place_class_decorator_on_the_same_line, [resharper_]place_class_decorator_on_the_same_line

Possible values:

true | false

Examples:

true

@test class A { @test @custom m() { } };

false

@test class A { @test @custom m() { } };

Method decorators on the same line with signature

Property names:

[resharper_]js_place_method_decorator_on_the_same_line, [resharper_]place_method_decorator_on_the_same_line

Possible values:

true | false

Examples:

true

@test class A { m() @test @custom m() { } };

false

@test class A { m() @test @custom m() { } };

Property decorators on the same line with property

Property names:

[resharper_]js_place_property_decorator_on_the_same_line, [resharper_]place_property_decorator_on_the_same_line

Possible values:

true | false

Examples:

true

@test class A { @test @custom set m(q) { } @test @custom get m() { return null; } };

false

@test class A { @test @custom set m(q) { } @test @custom get m() { return null; } };

Field decorators on the same line with field

Property names:

[resharper_]js_place_field_decorator_on_the_same_line, [resharper_]place_field_decorator_on_the_same_line

Possible values:

true | false

Examples:

true

@test class A { @test @custom f; };

false

@test class A { @test @custom f; };
Last modified: 26 May 2024