diff --git a/.editorconfig b/.editorconfig index 271822f..3396d2f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,13 +1,24 @@ +# 配置项文档:https://editorconfig.org/ + +# 告知 EditorConfig 插件,当前即是根文件 root = true +# 适用全部文件 [*] +## 设置字符集 charset = utf-8 +## 缩进风格 space | tab,建议 space indent_style = space +## 缩进的空格数(修改这里的话需要将 prettier.config.js 和 .vscode -> settings.json 也同步修改) indent_size = 2 +## 换行符类型 lf | cr | crlf,一般都是设置为 lf end_of_line = lf +## 是否在文件末尾插入空白行 insert_final_newline = true +## 是否删除一行中的前后空格 trim_trailing_whitespace = true +# 适用 .md 文件 [*.md] insert_final_newline = false trim_trailing_whitespace = false