EditorConfig

No Change
adopt
First Added:October 1, 2024 Updated: July 2, 2026

EditorConfig. Is a repo-root .editorconfig file plus editor plugins that apply shared whitespace, encoding, and newline rules before language formatters or linters run.

Blurb

EditorConfig is a file format and collection of text editor plugins for maintaining consistent coding styles between different editors and IDEs.

Summary

Garden stance: We adopt EditorConfig for our estate.

When to use: Evaluate on a project when the capability clearly fits the requirement.

When to skip: When a simpler alternative already covers the need.

Details

Example baseline (team defaults; adjust per repo):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.md]
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
PropertyTypical use
indent_style / indent_sizeSpaces vs tabs per language
end_of_linelf for cross-platform repos
charsetutf-8 default
trim_trailing_whitespaceCleaner diffs (often off for .md if needed)
insert_final_newlinePOSIX text files; may differ for * vs *.md

Monorepos: nested .editorconfig in packages is allowed; closest match wins. Prefer one root file unless a subtree truly needs different EOL rules.

CI: optional editorconfig-checker in GitHub Actions if editors without plugins are common; most teams rely on linters plus local plugins.

Not the same as: .gitattributes (Git checkout normalization); Prettier config; Policy as Code.

References