EditorConfig 中的配置 .editorconfig

EditorConfig

EditorConfig 是一款代码风格设定插件,通过一个配置文件就可以约束编码风格,
在常用的 IDE,如 Atom, VS Code 等,都有它的插件实现。

.editorconfig 配置文件,将其放入项目的根目录

# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.{js,html,blade.php,css,scss}]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
评论数量: 0

0
点赞
251
浏览
0
评论

贡献 6
theDog
love tech