Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

.editorconfig

Cross-editor configuration file defining coding style preferences like indentation, line endings, and character encoding to maintain consistent formatting across different editors and IDEs.

EditorConfig is a simple, widely-supported convention for keeping coding style consistent across a team no matter which editor or IDE each person prefers. You drop an .editorconfig file at the root of a repository, declare a handful of formatting rules, and every compatible editor reads and applies them automatically. It answers one small but persistent question in collaborative work: whose indentation wins?

  • A plain-text .editorconfig file - INI-style sections keyed by file glob, committed to the repository alongside the code it governs.
  • A core set of properties - indent_style, indent_size, end_of_line, charset, trim_trailing_whitespace, and insert_final_newline cover the formatting that most style arguments are actually about.
  • Cascading, root-scoped resolution - Files are matched from the current directory upward until an entry with root = true stops the search, so nested projects can override the defaults.
  • Broad editor support - Honored natively or via plugin across VS Code, JetBrains IDEs, Vim, and most other editors, so the rules travel with the code rather than living in personal settings.

In API operations, EditorConfig shows up as the quiet baseline beneath the more visible governance layers. Consistent indentation and line endings keep hand-edited OpenAPI, AsyncAPI, and JSON Schema files diff-clean and reviewable, which matters when those artifacts are the contract. It pairs naturally with linters and formatters that enforce deeper rules, giving a repository a predictable shape before any OpenAPI style checks or CI governance ever run.