# EditorConfig helps developers define and maintain consistent # EditorConfig帮助开发人员定义和维护一致性 # coding styles between different editors and IDEs # 不同编辑器和ide之间的编码样式 # 打开需要格式化的文件并手动格式化代码(Mac OS :shift+option+f  Windows :shift+alt+f) # editorconfig.org # editorconfig顶级配置文件,停止向上寻找配置文件 root = true [*] # change these settings to your own preference # 将这些设置更改为您自己的首选项 # 缩进样式=空格 indent_style = tab # 缩进大小=2 indent_size = 8 # we recommend you to keep these unchanged # 我们建议你保持这些不变 # 换行符类型 = lf end_of_line = lf # 字符集=utf-8 charset = utf-8 # 删除行尾空格 = 是 trim_trailing_whitespace = true # 插入最后一行=真 insert_final_newline = true [*.md] # 删除行尾空格 = 否 trim_trailing_whitespace = false [package.json] # 缩进样式=空格 indent_style = space # 缩进大小=2 indent_size = 2