Template
chore: 声明换行符策略为 LF
- 新增 .gitattributes:* text=auto eol=lf + 二进制白名单,策略落在仓库层而非本机 core.autocrlf - 新增 .editorconfig:编辑器侧强制 utf-8 / LF / 末尾空行 - 背景:本机 core.autocrlf=true 且仓库无声明,出现 diff 为空却恒显 modified 的幻影脏文件(ENG-001) - 已 renormalize 全库,索引与工作区均为 LF
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
root = true
|
||||
|
||||
# 换行符与字符集的编辑器侧约束(ENG-001 的辅助机制,仓库层策略以 .gitattributes 为准)
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
# Markdown 的行尾双空格是硬换行语法,不做清理
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{json,json5,yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[{*.ets,*.ts,*.js,*.mjs}]
|
||||
indent_size = 2
|
||||
Reference in New Issue
Block a user