Configure editors to explicitly use LF / \n line endings (#10916)

This commit is contained in:
Avasam
2023-10-19 03:34:40 -04:00
committed by GitHub
parent 35873ec3d8
commit 3cb1a8faed
3 changed files with 11 additions and 5 deletions

View File

@@ -1,12 +1,14 @@
root = true
[*.{py,pyi,rst,md,yml,yaml,toml,json,txt}]
[*]
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
end_of_line = lf
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.{py,pyi,toml,json}]
indent_size = 4
[*.{yml,yaml}]
indent_size = 2

3
.gitattributes vendored
View File

@@ -1,3 +1,6 @@
# Normalize EOF
* autocrlf=false
* eol=lf
# Set linguist-language to support comments syntax highlight
**/stubtest_allowlist*.txt linguist-language=ini
tests/stubtest_allowlists/*.txt linguist-language=ini

View File

@@ -24,6 +24,7 @@
"**/.*_cache": true, // mypy and Ruff cache
"**/__pycache__": true
},
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
@@ -31,7 +32,7 @@
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"[json][jsonc][python]": {
"[json][jsonc][python][toml]": {
"editor.tabSize": 4
},
"editor.rulers": [