EditorConfig
EditorConfig gives compatible editors a shared baseline for indentation, whitespace, and line endings. Open the repository root in your editor and enable its built-in EditorConfig support or install the editor's integration.
Configuration in this template
The root .editorconfig sets UTF-8, LF line endings, a final newline, and trimming of trailing whitespace. Its defaults use two spaces for indentation and a maximum line length setting of 120. Markdown and files named Dockerfile override the indentation size to four spaces. Some editors support only a subset of the properties.
Check that your editor picked it up
Open an existing Markdown file and a JSON file, then check the editor's indentation indicator. The Markdown file should use four spaces and the JSON file should use two. If your editor chooses a formatter on save, that formatter may have its own configuration. Biome is configured to read EditorConfig values, and Ruff applies its Python settings from ruff.toml.
Change a rule
If your project needs a different style for a file type, add a matching section to .editorconfig and check a representative file in the editor. Update the corresponding formatter settings if editor behavior and formatter output disagree. EditorConfig file format