Tweak .editorconfig and line endings

- Use `lf` line endings everywhere. This works fine even on Windows, and is more common for git repos. It also matches prettier's default.

For .editorconfig:

- Remove `insert_final_newline = false`: Omitting the final newline isn't supported by prettier or rustfmt.
- Remove `trim_trailing_whitespace = false`: The formatters will remove trailing whitespace anyways. I can't think of a good reason to want to keep trailing whitespace.
- Remove other redundant options.
This commit is contained in:
Brian Bowman 2022-07-19 04:37:34 -05:00
parent bf2ae51fb0
commit e9df0f17db
3 changed files with 4 additions and 15 deletions

View File

@ -2,22 +2,9 @@ root = true
[*]
charset = utf-8
end_of_line = crlf
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 2
trim_trailing_whitespace = false
[*.rs]
max_line_length = 100
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[{*.ats,*.cts,*.mts,*.ts}]
indent_size = 2
[*.json]
indent_size = 2

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

View File

@ -1,3 +1,4 @@
newline_style = "Unix"
tab_spaces = 2
use_field_init_shorthand = true
use_try_shorthand = true