Context
In #653, a contributor noted there is no .editorconfig in the repo and a mix of "trim trailing whitespace" vs "leave trailing whitespace" in the code. Their editor was set to trim, resulting in significant whitespace noise in an otherwise surgical PR (+404/-331 total, ~93 substantive lines).
Problem
Without an .editorconfig, contributors' editors apply inconsistent formatting (trailing whitespace, final newlines, indent style) which inflates diffs and makes code review harder.
Proposal
Add a root .editorconfig with sensible defaults:
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4 for Python, 2 for YAML/JSON/MD
charset = utf-8
end_of_line = lf
This should be a standalone formatting commit (no logic changes) so the whitespace normalization is isolated from feature work.
References
Context
In #653, a contributor noted there is no
.editorconfigin the repo and a mix of "trim trailing whitespace" vs "leave trailing whitespace" in the code. Their editor was set to trim, resulting in significant whitespace noise in an otherwise surgical PR (+404/-331 total, ~93 substantive lines).Problem
Without an
.editorconfig, contributors' editors apply inconsistent formatting (trailing whitespace, final newlines, indent style) which inflates diffs and makes code review harder.Proposal
Add a root
.editorconfigwith sensible defaults:trim_trailing_whitespace = trueinsert_final_newline = trueindent_style = spaceindent_size = 4for Python,2for YAML/JSON/MDcharset = utf-8end_of_line = lfThis should be a standalone formatting commit (no logic changes) so the whitespace normalization is isolated from feature work.
References