From 699a9ee9c3dc230096fc8d82bd09f0622bcf6151 Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Sun, 13 Sep 2026 11:34:16 +0200 Subject: [PATCH] [TASK] Adopt the shared .editorconfig The file is maintained in one place now, the How to Document guide, and copied out unchanged. This repository's copy pointed at a master in T3DocTeam that no longer describes what we do. What changes here: code examples indent two spaces instead of four, so that a nested example still fits the 80 characters the prose around it is wrapped to. reST keeps four, because there the indentation is structure rather than code. The Makefile section covers **.mk as well, and a .diff is no longer stripped of trailing whitespace, which in a patch is content rather than whitespace. Nothing is reformatted by this commit. The file states the rule; bringing the existing examples in line follows separately. Assisted-by: Claude Opus 5 Signed-off-by: Lina Wolf --- .editorconfig | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.editorconfig b/.editorconfig index fcbcc54b..06f208ff 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,29 +1,32 @@ -# EditorConfig is awesome: http://EditorConfig.org -# -# Use as master: https://github.com/TYPO3-Documentation/T3DocTeam/blob/main/.editorconfig +# EditorConfig is awesome: https://EditorConfig.org + +# Master copy, used unchanged by every TYPO3 documentation repository: +# https://github.com/TYPO3-Documentation/TYPO3CMS-Guide-HowToDocument -# top-most EditorConfig file root = true -[{*.rst,*.rst.txt}] +# Code examples indent two spaces, whatever the language, so that a nested +# example still fits the line length the prose around it is wrapped to +[*] charset = utf-8 end_of_line = lf +indent_style = space +indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true -indent_style = space + +# reStructuredText is the exception: one indentation level is four spaces +[{*.rst,*.rst.txt}] indent_size = 4 max_line_length = 80 -# MD-Files [*.md] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = space -indent_size = 4 max_line_length = 80 -[Makefile] -# Use tabs for indentation (Makefiles require tabs) +# Makefiles do not work without real tabs +[{Makefile,_Makefile,**.mk}] indent_style = tab + +# In a patch a leading or trailing space is content, not whitespace +[*.diff] +trim_trailing_whitespace = false