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 +}