jscs validateIndentation with spaces .editorconfig

jscs validateIndentation with spaces .editorconfig

拥有这个 .editorconfig:

# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

.jscsrc 的语法是什么 我知道标签就像

"validateIndentation": "\t",

但是 4 个空格的语法是什么?

空格的语法是只使用一个整数,所以:

"validateIndentation": 4,

相关摘录自the docs

validateIndentation

Validates indentation for switch statements and block statements

Types: Integer, String or Object

Values:

Integer: A positive number of spaces