ReSharper 2025.3 ヘルプ

TypeScript の EditorConfig プロパティ: 改行

空白行

フィールドの周囲の空白行と署名宣言

プロパティ名:

[resharper_]js_min_blank_lines_around_fields , [resharper_]min_blank_lines_around_fields

使用可能な値:

整数

例:

フォーマット前

フォーマット後 value: 0

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

フォーマット前

フォーマット後 value: 1

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

フォーマット前

フォーマット後 value: 2

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

タイプとモジュールの周囲の空白行

プロパティ名:

[resharper_]js_min_blank_lines_around_types , [resharper_]min_blank_lines_around_types

使用可能な値:

整数

例:

フォーマット前

フォーマット後 value: 0

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

フォーマット前

フォーマット後 value: 1

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

フォーマット前

フォーマット後 value: 2

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

改行

列挙型

プロパティ名:

[resharper_]js_wrap_enum_style , [resharper_]wrap_enum_style

使用可能な値:

  • do_not_change : 変更しない

  • on_single_line : 強制的に 1 行に入れる

  • line_break : 強制改行

例:

フォーマット前

フォーマット後 do_not_change

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

フォーマット前

フォーマット後 on_single_line

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

フォーマット前

フォーマット後 line_break

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

ラッピングと切り捨て

ユニオンタイプの使用箇所をラップする

プロパティ名:

[resharper_]js_wrap_union_type_usage , [resharper_]wrap_union_type_usage

使用可能な値:

  • wrap_if_long : シンプルラップ

  • chop_if_long : ロングまたは複数行の場合はチョップ

  • chop_always : 常にチョップ

例:

フォーマット前

フォーマット後 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';

フォーマット前

フォーマット後 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';

フォーマット前

フォーマット後 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';

新しい行に配置する

各デコレータを新しい行に配置する

プロパティ名:

[resharper_]js_place_each_decorator_on_new_line , [resharper_]place_each_decorator_on_new_line

使用可能な値:

true | false

例:

true

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

false

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

クラスと同じ行のクラスデコレータ

プロパティ名:

[resharper_]js_place_class_decorator_on_the_same_line , [resharper_]place_class_decorator_on_the_same_line

使用可能な値:

true | false

例:

true

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

false

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

シグネチャーを持つ同じ行のメソッドデコレータ

プロパティ名:

[resharper_]js_place_method_decorator_on_the_same_line , [resharper_]place_method_decorator_on_the_same_line

使用可能な値:

true | false

例:

true

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

false

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

プロパティと同じ行のプロパティデコレータ

プロパティ名:

[resharper_]js_place_property_decorator_on_the_same_line , [resharper_]place_property_decorator_on_the_same_line

使用可能な値:

true | false

例:

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; } };

フィールドと同じ行にあるフィールドデコレータ

プロパティ名:

[resharper_]js_place_field_decorator_on_the_same_line , [resharper_]place_field_decorator_on_the_same_line

使用可能な値:

true | false

例:

true

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

false

@test class A { @test @custom f; };
2024 年 5 月 26 日