JavaScript の EditorConfig プロパティ: スペース
既存のフォーマットを保持する
内部の余分なスペース
プロパティ名:
[resharper_]js_extra_spaces , [resharper_]extra_spaces
使用可能な値:
remove_all: 余分なスペースをすべて削除するleave_tabs: 余分なタブを残すleave_multiple: 複数の余分なスペースを残すleave_all: スペースとタブをすべて残す
例:
フォーマット前 | フォーマット後 remove_all |
|---|---|
x = foo ( 5 ) ;
xx = foo ( 5 + 6 ) ;
xxx = foo ( 5 + 6 + 7 ) ;
tab = foo ( 5 ) ;
tabx = foo ( 5 + 6 ) ;
tabxx = foo ( 5 + 6 + 7 ) ; | x = foo(5);
xx = foo(5 + 6);
xxx = foo(5 + 6 + 7);
tab = foo(5);
tabx = foo(5 + 6);
tabxx = foo(5 + 6 + 7); |
フォーマット前 | フォーマット後 leave_tabs |
|---|---|
x = foo ( 5 ) ;
xx = foo ( 5 + 6 ) ;
xxx = foo ( 5 + 6 + 7 ) ;
tab = foo ( 5 ) ;
tabx = foo ( 5 + 6 ) ;
tabxx = foo ( 5 + 6 + 7 ) ; | x = foo(5);
xx = foo(5 + 6);
xxx = foo(5 + 6 + 7);
tab = foo ( 5 ) ;
tabx = foo ( 5 + 6 ) ;
tabxx = foo ( 5 + 6 + 7 ) ; |
フォーマット前 | フォーマット後 leave_multiple |
|---|---|
x = foo ( 5 ) ;
xx = foo ( 5 + 6 ) ;
xxx = foo ( 5 + 6 + 7 ) ;
tab = foo ( 5 ) ;
tabx = foo ( 5 + 6 ) ;
tabxx = foo ( 5 + 6 + 7 ) ; | x = foo(5 );
xx = foo(5 + 6 );
xxx = foo(5 + 6 + 7);
tab = foo(5);
tabx = foo(5 + 6);
tabxx = foo(5 + 6 + 7); |
フォーマット前 | フォーマット後 leave_all |
|---|---|
x = foo ( 5 ) ;
xx = foo ( 5 + 6 ) ;
xxx = foo ( 5 + 6 + 7 ) ;
tab = foo ( 5 ) ;
tabx = foo ( 5 + 6 ) ;
tabxx = foo ( 5 + 6 + 7 ) ; | x = foo ( 5 ) ;
xx = foo ( 5 + 6 ) ;
xxx = foo ( 5 + 6 + 7 ) ;
tab = foo ( 5 ) ;
tabx = foo ( 5 + 6 ) ;
tabxx = foo ( 5 + 6 + 7 ) ; |
コンマ
コンマの後
プロパティ名:
[resharper_]js_space_after_comma , [resharper_]space_after_comma
使用可能な値:
true | false
例:
true |
|---|
foo(a, b, c); |
false |
|---|
foo(a,b,c); |
コンマの前
プロパティ名:
[resharper_]js_space_before_comma , [resharper_]space_before_comma
使用可能な値:
true | false
例:
true |
|---|
foo(a , b , c); |
false |
|---|
foo(a, b, c); |
セミコロン
セミコロンの前
プロパティ名:
[resharper_]js_space_before_semicolon , [resharper_]space_before_semicolon
使用可能な値:
true | false
例:
true |
|---|
foo(a, b, c) ; |
false |
|---|
foo(a, b, c); |
for ステートメントのセミコロンの前
プロパティ名:
[resharper_]js_space_before_semicolon_in_for_statement , [resharper_]space_before_semicolon_in_for_statement
使用可能な値:
true | false
例:
true |
|---|
for (var i = 1 ; i < 10 ; i++) {
} |
false |
|---|
for (var i = 1; i < 10; i++) {
} |
for ステートメントのセミコロンの後
プロパティ名:
[resharper_]js_space_after_semicolon_in_for_statement , [resharper_]space_after_semicolon_in_for_statement
使用可能な値:
true | false
例:
true |
|---|
for (var i = 1; i < 10; i++) {
} |
false |
|---|
for (var i = 1;i < 10;i++) {
} |
関数呼び出し
丸括弧の前
プロパティ名:
[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
使用可能な値:
true | false
例:
true |
|---|
foo (a, b, c); |
false |
|---|
foo(a, b, c); |
空の括弧の前
プロパティ名:
[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
使用可能な値:
true | false
例:
true |
|---|
foo (); |
false |
|---|
foo(); |
括弧内
プロパティ名:
[resharper_]js_space_between_method_call_parameter_list_parentheses , [resharper_]space_between_method_call_parameter_list_parentheses
使用可能な値:
true | false
例:
true |
|---|
foo( a, b, c ); |
false |
|---|
foo(a, b, c); |
空の括弧内
プロパティ名:
[resharper_]js_space_between_method_call_empty_parameter_list_parentheses , [resharper_]space_between_method_call_empty_parameter_list_parentheses
使用可能な値:
true | false
例:
true |
|---|
foo( ); |
false |
|---|
foo(); |
関数宣言の中
丸括弧の前
プロパティ名:
[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
使用可能な値:
true | false
例:
true |
|---|
function Foo (a, b) {} |
false |
|---|
function Foo(a, b) {} |
匿名メソッドの括弧の前
プロパティ名:
[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
使用可能な値:
true | false
例:
true |
|---|
function (a, b) {} |
false |
|---|
function(a, b) {} |
空の括弧内
プロパティ名:
[resharper_]js_space_between_method_declaration_empty_parameter_list_parentheses , [resharper_]space_between_method_declaration_empty_parameter_list_parentheses
使用可能な値:
true | false
例:
true |
|---|
function Foo( ) {} |
false |
|---|
function Foo() {} |
括弧内
プロパティ名:
[resharper_]js_space_between_method_declaration_parameter_list_parentheses , [resharper_]space_between_method_declaration_parameter_list_parentheses
使用可能な値:
true | false
例:
true |
|---|
function Foo( a, b ) {} |
false |
|---|
function Foo(a, b) {} |
制御文内
丸括弧の前
プロパティ名:
[resharper_]js_space_after_keywords_in_control_flow_statements , [resharper_]space_after_keywords_in_control_flow_statements
使用可能な値:
true | false
例:
true |
|---|
while (condition) {
} |
false |
|---|
while(condition) {
} |
括弧内
プロパティ名:
[resharper_]js_space_between_parentheses_of_control_flow_statements , [resharper_]space_between_parentheses_of_control_flow_statements
使用可能な値:
true | false
例:
true |
|---|
do {
} while ( condition ) |
false |
|---|
do {
} while (condition) |
インデックス式
括弧より前
プロパティ名:
[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
使用可能な値:
true | false
例:
true |
|---|
a [i] |
false |
|---|
a[i] |
角括弧内
プロパティ名:
[resharper_]js_space_within_array_access_brackets、[resharper_]js_space_between_square_brackets、[resharper_]space_within_array_access_brackets、[resharper_]space_between_square_brackets
使用可能な値:
true | false
例:
true |
|---|
a[ i ] |
false |
|---|
a[i] |
三項演算子では ' ? : '
三項演算子で ' ? : '
プロパティ名:
[resharper_]js_space_before_ternary_quest , [resharper_]space_before_ternary_quest
使用可能な値:
true | false
例:
true |
|---|
a ? b : c |
false |
|---|
a? b : c |
'?' の後
プロパティ名:
[resharper_]js_space_after_ternary_quest , [resharper_]space_after_ternary_quest
使用可能な値:
true | false
例:
true |
|---|
a ? b : c |
false |
|---|
a ?b : c |
':' の前
プロパティ名:
[resharper_]js_space_before_ternary_colon , [resharper_]space_before_ternary_colon
使用可能な値:
true | false
例:
true |
|---|
a ? b : c |
false |
|---|
a ? b: c |
'?' の後
プロパティ名:
[resharper_]js_space_after_ternary_colon , [resharper_]space_after_ternary_colon
使用可能な値:
true | false
例:
true |
|---|
a ? b : c |
false |
|---|
a ? b :c |
オブジェクト式
':' の前
プロパティ名:
[resharper_]js_space_before_property_colon , [resharper_]space_before_property_colon
使用可能な値:
true | false
例:
true |
|---|
var o = { a : b } |
false |
|---|
var o = { a: b } |
'?' の後
プロパティ名:
[resharper_]js_space_after_property_colon , [resharper_]space_after_property_colon
使用可能な値:
true | false
例:
true |
|---|
var o = { a: b } |
false |
|---|
var o = { a:b } |
波括弧内
プロパティ名:
[resharper_]js_space_within_object_literal_braces , [resharper_]space_within_object_literal_braces
使用可能な値:
true | false
例:
true |
|---|
var o = { a: b } |
false |
|---|
var o = {a: b} |
空の波括弧内
プロパティ名:
[resharper_]js_space_within_empty_object_literal_braces , [resharper_]space_within_empty_object_literal_braces
使用可能な値:
true | false
例:
true |
|---|
var o = { } |
false |
|---|
var o = {} |
インポート申告において
波括弧内
プロパティ名:
[resharper_]js_space_within_import_braces , [resharper_]space_within_import_braces
使用可能な値:
true | false
例:
true |
|---|
import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; |
false |
|---|
import {Component, EventEmitter, OnInit, Output, Input} from '@angular/core'; |
配列リテラル内
角括弧内
プロパティ名:
[resharper_]js_space_within_array_literal_brackets、[resharper_]js_space_between_square_brackets、[resharper_]space_within_array_literal_brackets、[resharper_]space_between_square_brackets
使用可能な値:
true | false
例:
true |
|---|
[ a, b, c ] |
false |
|---|
[a, b, c] |
空の角括弧内
プロパティ名:
[resharper_]js_space_within_empty_array_literal_brackets、[resharper_]js_space_between_empty_square_brackets、[resharper_]space_within_empty_array_literal_brackets、[resharper_]space_between_empty_square_brackets
使用可能な値:
true | false
例:
true |
|---|
[ ] |
false |
|---|
[] |
式
バイナリ演算子の周囲
プロパティ名:
[resharper_]js_space_around_binary_operator , [resharper_]space_around_binary_operator
使用可能な値:
true | false
例:
true |
|---|
a + b |
false |
|---|
a+b |
代入演算子の周囲
プロパティ名:
[resharper_]js_space_around_assignment_operator , [resharper_]space_around_assignment_operator
使用可能な値:
true | false
例:
true |
|---|
a = b; |
false |
|---|
a=b; |
ドット周辺
プロパティ名:
[resharper_]js_space_around_dot、[resharper_]js_space_around_member_access_operator、[resharper_]space_around_dot、[resharper_]space_around_member_access_operator
使用可能な値:
true | false
例:
true |
|---|
obj . toString() |
false |
|---|
obj.toString() |
括弧内
プロパティ名:
[resharper_]js_space_within_parentheses , [resharper_]space_within_parentheses
使用可能な値:
true | false
例:
true |
|---|
( a + b ).toString(); |
false |
|---|
(a + b).toString(); |
Case ステートメント
コロンの前
プロパティ名:
[resharper_]js_space_before_colon_in_case , [resharper_]space_before_colon_in_case
使用可能な値:
true | false
例:
true |
|---|
switch (a) {
case b :
break;
} |
false |
|---|
switch (a) {
case b:
break;
} |
ラムダ
':' の前
プロパティ名:
[resharper_]js_space_before_arrow , [resharper_]space_before_arrow
使用可能な値:
true | false
例:
true |
|---|
var v = (a, b, c) => a + b + c; |
false |
|---|
var v = (a, b, c)=> a + b + c; |
ラムダ式の '=>' の後
プロパティ名:
[resharper_]js_space_after_arrow , [resharper_]space_after_arrow
使用可能な値:
true | false
例:
true |
|---|
var v = (a, b, c) => a + b + c; |
false |
|---|
var v = (a, b, c) =>a + b + c; |
テンプレートリテラル
テンプレート引数の周囲の波括弧内
プロパティ名:
[resharper_]js_space_within_template_argument , [resharper_]space_within_template_argument
使用可能な値:
true | false
例:
true |
|---|
var v = `${ a } ${ x + y }` |
false |
|---|
var v = `${a} ${x + y}` |