💄 style(custom): 使用.editorconfig和.gitattributes来约束行分隔符和编辑器设置

This commit is contained in:
nongyehong
2023-12-19 14:45:11 +08:00
committed by Dawn
parent af212d79c1
commit ddcac2e9d8
3 changed files with 29 additions and 1 deletions

11
.editorconfig Normal file
View File

@@ -0,0 +1,11 @@
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = tab
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

17
.gitattributes vendored Normal file
View File

@@ -0,0 +1,17 @@
"*.vue" eol=lf
"*.js" eol=lf
"*.ts" eol=lf
"*.jsx" eol=lf
"*.tsx" eol=lf
"*.cjs" eol=lf
"*.cts" eol=lf
"*.mjs" eol=lf
"*.mts" eol=lf
"*.json" eol=lf
"*.html" eol=lf
"*.css" eol=lf
"*.less" eol=lf
"*.scss" eol=lf
"*.sass" eol=lf
"*.styl" eol=lf
"*.md" eol=lf

View File

@@ -10,5 +10,5 @@
"arrowParens": "always",
"bracketSameLine": true,
"jsxBracketSameLine": true,
"endOfLine": "crlf"
"endOfLine": "lf"
}