From d2ed4ddcbe3f72bfa047188fef3db8b33b8adc47 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 5 Jul 2026 10:08:28 -0700 Subject: [PATCH 1/4] Add the global editorconfig CRLF default Set end_of_line = crlf on the [*] block so every file type has a defined ending, matching the fleet template. Per-type CRLF rules and .gitattributes LF pins unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Pieter Viljoen --- .editorconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/.editorconfig b/.editorconfig index 7e3660b..c1b8759 100644 --- a/.editorconfig +++ b/.editorconfig @@ -16,6 +16,7 @@ root = true # Defaults [*] charset = utf-8 +end_of_line = crlf indent_size = 4 indent_style = space insert_final_newline = true From 4767a8eee0718c10e8fb90b4e6c35a53dceecd00 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 5 Jul 2026 10:18:05 -0700 Subject: [PATCH 2/4] Keep husky LF and preserve LanguageData under the CRLF default The global [*] end_of_line = crlf also matches the extensionless .husky/pre-commit hook (must stay LF) and the downloaded LanguageData/* files (a mix of LF/CRLF that must persist byte-for-byte). Add an LF override for the hook (aligned with .gitattributes) and end_of_line = unset for LanguageData so the editor does not normalize the source data. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Pieter Viljoen --- .editorconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.editorconfig b/.editorconfig index c1b8759..c380acd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -45,6 +45,10 @@ end_of_line = crlf [*.sh] end_of_line = lf +# Husky git hook is an extensionless shell script - LF like other scripts (matches the .gitattributes pin) +[.husky/pre-commit] +end_of_line = lf + # Dockerfiles - CRLF breaks RUN heredocs and line continuations [{Dockerfile,*.Dockerfile}] end_of_line = lf @@ -219,3 +223,7 @@ resharper_csharp_trailing_comma_in_multiline_lists = true resharper_csharp_var_for_built_in_types = false resharper_csharp_var_when_type_is_apparent = false resharper_csharp_var_when_type_is_not_apparent = false + +# Downloaded language data - preserve the source bytes/endings, do not enforce an EOL +[LanguageData/*] +end_of_line = unset From c75d70a4eff1b3ebb346da2c058d1587ad9e71d2 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 5 Jul 2026 10:21:41 -0700 Subject: [PATCH 3/4] Disable all editor normalization for LanguageData, not just EOL The [*] defaults (insert_final_newline, trim_trailing_whitespace, charset) still applied to the downloaded LanguageData/* files after only unsetting end_of_line, and any of them can mutate byte-sensitive source data. Unset charset/end_of_line and set insert_final_newline/trim_trailing_whitespace = false so the editor preserves the source bytes exactly. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Pieter Viljoen --- .editorconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index c380acd..cafeb09 100644 --- a/.editorconfig +++ b/.editorconfig @@ -224,6 +224,9 @@ resharper_csharp_var_for_built_in_types = false resharper_csharp_var_when_type_is_apparent = false resharper_csharp_var_when_type_is_not_apparent = false -# Downloaded language data - preserve the source bytes/endings, do not enforce an EOL +# Downloaded language data - preserve the source bytes exactly; enforce no editor normalization [LanguageData/*] +charset = unset end_of_line = unset +insert_final_newline = false +trim_trailing_whitespace = false From 472ffe854ccbf9c73bc5268ccf0e77d5e7167a57 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 5 Jul 2026 10:26:20 -0700 Subject: [PATCH 4/4] Place the LanguageData block with the line-ending governance Move the LanguageData/* byte-preservation block above the '.NET-only below' separator, alongside the other line-ending rules, instead of at the file end in the .NET-style section. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Pieter Viljoen --- .editorconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.editorconfig b/.editorconfig index cafeb09..089d752 100644 --- a/.editorconfig +++ b/.editorconfig @@ -57,6 +57,13 @@ end_of_line = lf [*.{cmd,bat,ps1}] end_of_line = crlf +# Downloaded language data - preserve the source bytes exactly; enforce no editor normalization +[LanguageData/*] +charset = unset +end_of_line = unset +insert_final_newline = false +trim_trailing_whitespace = false + # --- .NET-only below: C# and ReSharper style. Everything above is line-ending governance. --- # C# files @@ -223,10 +230,3 @@ resharper_csharp_trailing_comma_in_multiline_lists = true resharper_csharp_var_for_built_in_types = false resharper_csharp_var_when_type_is_apparent = false resharper_csharp_var_when_type_is_not_apparent = false - -# Downloaded language data - preserve the source bytes exactly; enforce no editor normalization -[LanguageData/*] -charset = unset -end_of_line = unset -insert_final_newline = false -trim_trailing_whitespace = false