From 9a71b7967c0bce8e087e69dc2fb7644d581c5e26 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Tue, 12 May 2026 20:30:48 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=85=8D=E7=BD=AE=E8=B7=A8=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E8=A1=8C=E5=B0=BE=E8=A7=84=E8=8C=83=E4=B8=8E=20VSCode?= =?UTF-8?q?=20=E7=BC=96=E8=BE=91=E5=99=A8=E7=BB=9F=E4=B8=80=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 32 ++++++++++++++++++++++++++++++++ .vscode/settings.json | 10 ++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .gitattributes create mode 100644 .vscode/settings.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..54ace9e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,32 @@ +# 跨平台行尾规范 +# 所有文本文件统一用 LF(Unix 风格),避免 CRLF/LF 混用 +* text=auto eol=lf + +# 二进制文件不转换行尾 +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.svg binary +*.pdf binary +*.zip binary +*.gz binary +*.tar binary +*.woff binary +*.woff2 binary +*.ttf binary +*.eot binary +*.mp4 binary +*.mov binary +*.mp3 binary + +# Shell 脚本必须 LF +*.sh text eol=lf + +# Windows 批处理必须 CRLF +*.bat text eol=crlf +*.cmd text eol=crlf + +# 锁定文件(如 package-lock.json)保持 LF +*.lock text eol=lf diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..94bd0cf --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "editor.tabSize": 2, + "editor.insertSpaces": true, + "editor.detectIndentation": false, + + "files.eol": "\n", + "files.encoding": "utf8", + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true +}