统一项目代码风格

38 阅读1分钟
  • 项目根目录下增加一个.editorconfig的文件
# http://editorconfig.org
root = true

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

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
  • VSCode 需要安装 EditorConfig for VSCode插件