chore: add encoding config to prevent Chinese garbled text (.editorconfig, .gitattributes)

This commit is contained in:
2025-11-16 15:42:18 +08:00
parent 39eb62ee79
commit 8a17dc80ae
2 changed files with 70 additions and 0 deletions

33
.editorconfig Normal file
View File

@@ -0,0 +1,33 @@
# EditorConfig is awesome: https://EditorConfig.org
# 顶级配置文件
root = true
# 所有文件的默认设置
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# TypeScript/JavaScript 文件
[*.{ts,tsx,js,jsx}]
indent_style = space
indent_size = 2
# JSON 文件
[*.json]
indent_style = space
indent_size = 2
# Markdown 文件(不删除行尾空格,因为两个空格代表换行)
[*.md]
trim_trailing_whitespace = false
# YAML 文件
[*.{yml,yaml}]
indent_style = space
indent_size = 2