Skip to content

[TASK] Settle on one .editorconfig and write down what it means - #569

Merged
linawolf merged 1 commit into
mainfrom
task/unify-editorconfig
Sep 13, 2026
Merged

linawolf merged 1 commit into
mainfrom
task/unify-editorconfig

Conversation

@linawolf

Copy link
Copy Markdown
Member

Sixteen repositories run thirteen different .editorconfig files, and the
two authorities contradict each other. Five of them set indent_size = 2
for TypoScript, YAML and JavaScript, while this guide says in writing
that "code examples use four spaces as indentation level as well".
reference-typoscript and reference-viewhelper carry a copy of the Core's
file, stale enough to still demand tabs for .xlf where the Core asks for
spaces, and carrying rules for .sql, .htaccess, package.json and
.stylelintrc — seven files in the entire workspace, none of them below a
Documentation/ directory.

The rule is now one sentence: two spaces, four for reST. Code examples
are what a reader copies, and every level of nesting spends four of the
80 characters the prose around it is wrapped to; two keeps a nested
example readable both rendered and in the source. That this departs on
purpose from what a language uses in a real project, PSR-12 included, is
said out loud instead of left to be discovered.

reST keeps four spaces. There the indentation is structure rather than
code, and the guide's explanation of it is unchanged.

Two entries are new. Makefiles keep real tabs as before, with **.mk
added so an included makefile is covered too. A .diff now sets
trim_trailing_whitespace = false, because a context line in a patch is a
single space and an editor that strips it breaks the patch —
sitepackage-guide has such a file today.

The sample in the guide is no longer a sample but the file itself, with
its line references corrected, so that copying it out is the documented
way to set a repository up.

Assisted-by: Claude Opus 5 noreply@anthropic.com
Signed-off-by: Lina Wolf

Sixteen repositories run thirteen different .editorconfig files, and the
two authorities contradict each other. Five of them set indent_size = 2
for TypoScript, YAML and JavaScript, while this guide says in writing
that "code examples use four spaces as indentation level as well".
reference-typoscript and reference-viewhelper carry a copy of the Core's
file, stale enough to still demand tabs for .xlf where the Core asks for
spaces, and carrying rules for .sql, .htaccess, package.json and
.stylelintrc — seven files in the entire workspace, none of them below a
Documentation/ directory.

The rule is now one sentence: two spaces, four for reST. Code examples
are what a reader copies, and every level of nesting spends four of the
80 characters the prose around it is wrapped to; two keeps a nested
example readable both rendered and in the source. That this departs on
purpose from what a language uses in a real project, PSR-12 included, is
said out loud instead of left to be discovered.

reST keeps four spaces. There the indentation is structure rather than
code, and the guide's explanation of it is unchanged.

Two entries are new. Makefiles keep real tabs as before, with **.mk
added so an included makefile is covered too. A .diff now sets
trim_trailing_whitespace = false, because a context line in a patch is a
single space and an editor that strips it breaks the patch —
sitepackage-guide has such a file today.

The sample in the guide is no longer a sample but the file itself, with
its line references corrected, so that copying it out is the documented
way to set a repository up.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Lina Wolf
@linawolf
linawolf merged commit 2a38a7a into main Sep 13, 2026
2 checks passed
@linawolf
linawolf deleted the task/unify-editorconfig branch September 13, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant