Skip to content

Commit 3cb1a8f

Browse files
authored
Configure editors to explicitly use LF / \n line endings (#10916)
1 parent 35873ec commit 3cb1a8f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.editorconfig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
root = true
22

3-
[*.{py,pyi,rst,md,yml,yaml,toml,json,txt}]
3+
[*]
44
trim_trailing_whitespace = true
55
insert_final_newline = true
66
indent_style = space
7+
end_of_line = lf
8+
indent_size = 2
9+
10+
[*.md]
11+
trim_trailing_whitespace = false
712

813
[*.{py,pyi,toml,json}]
914
indent_size = 4
10-
11-
[*.{yml,yaml}]
12-
indent_size = 2

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Normalize EOF
2+
* autocrlf=false
3+
* eol=lf
14
# Set linguist-language to support comments syntax highlight
25
**/stubtest_allowlist*.txt linguist-language=ini
36
tests/stubtest_allowlists/*.txt linguist-language=ini

.vscode/settings.default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
"**/.*_cache": true, // mypy and Ruff cache
2525
"**/__pycache__": true
2626
},
27+
"files.eol": "\n",
2728
"files.insertFinalNewline": true,
2829
"files.trimFinalNewlines": true,
2930
"files.trimTrailingWhitespace": true,
3031
"editor.comments.insertSpace": true,
3132
"editor.insertSpaces": true,
3233
"editor.detectIndentation": false,
3334
"editor.tabSize": 2,
34-
"[json][jsonc][python]": {
35+
"[json][jsonc][python][toml]": {
3536
"editor.tabSize": 4
3637
},
3738
"editor.rulers": [

0 commit comments

Comments
 (0)