03-配置 .editorconfig

由于在团队协作中,不同的人使用ide的不同,导致本身配置存在差异,比如tab缩进有的是2格有的是4格,故配置.editorconfig文件

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true //最后要空一行,是业界代码规范
trim_trailing_whitespace = true

ps:

vscode要安装editorconfig插件

webstorm已经默认安装了

  

原文地址:https://www.cnblogs.com/ipoodle/p/11028824.html