fix: 添加 .gitattributes 和 .editorconfig 统一换行符规则
This commit is contained in:
1 parent
2dbce0a362
commit
c2bc13b5d6
3 files changed
+61
-1
No files matched your search
@@ -0,0 +1,26 @@
|
|||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# 表示是最顶层的配置文件
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# 对所有文件生效
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
# 对 JS、TS、Vue 文件的配置
|
||||||
|
[*.{js,jsx,ts,tsx,vue}]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
# 对 JSON、YAML 文件的配置
|
||||||
|
[*.{json,yml,yaml}]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
# 对 Markdown 文件的配置
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# 设置默认行为,以防人们没有设置 core.autocrlf
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# 明确声明你想要始终规范化并在检出时转换为原生行结束符的文本文件
|
||||||
|
*.vue text eol=lf
|
||||||
|
*.js text eol=lf
|
||||||
|
*.ts text eol=lf
|
||||||
|
*.jsx text eol=lf
|
||||||
|
*.tsx text eol=lf
|
||||||
|
*.json text eol=lf
|
||||||
|
*.css text eol=lf
|
||||||
|
*.scss text eol=lf
|
||||||
|
*.sass text eol=lf
|
||||||
|
*.html text eol=lf
|
||||||
|
*.htm text eol=lf
|
||||||
|
*.xml text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
|
*.yml text eol=lf
|
||||||
|
*.yaml text eol=lf
|
||||||
|
|
||||||
|
# 明确声明你不想规范化并希望原样保留的文件
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.gif binary
|
||||||
|
*.ico binary
|
||||||
|
*.svg binary
|
||||||
|
*.eot binary
|
||||||
|
*.ttf binary
|
||||||
|
*.woff binary
|
||||||
|
*.woff2 binary
|
||||||
|
*.otf binary
|
||||||
|
|
||||||
+2
-1
@@ -4,5 +4,6 @@
|
|||||||
"trailingComma": "all",
|
"trailingComma": "all",
|
||||||
"semi": false,
|
"semi": false,
|
||||||
"singleQuote": false,
|
"singleQuote": false,
|
||||||
"printWidth": 140
|
"printWidth": 140,
|
||||||
|
"endOfLine": "lf"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user