From 32bb69a98d362ba910adf57f1f42bd09a650d5b2 Mon Sep 17 00:00:00 2001 From: "Aaron K. Clark" Date: Mon, 18 May 2026 01:10:21 -0500 Subject: [PATCH] chore: add .editorconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Locks in the whitespace conventions the codebase has already settled on so editors don't silently rewrite them on open. Specifically: - LF line endings, UTF-8, trailing newline. - 4-space indent for JS / migrations / models / etc. - 2-space indent for YAML (workflows, woodpecker, dependabot) and JSON. - Trailing-whitespace stripping enabled everywhere EXCEPT Markdown, where two trailing spaces can encode a hard line break. - Tab indent for Makefiles (the only valid choice there). ESLint already enforces some of this at lint time. EditorConfig moves the enforcement earlier — to file-open rather than file-save — so a contributor's editor doesn't fight the lint config on every keystroke. Co-Authored-By: Claude Opus 4.7 (1M context) --- .editorconfig | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..afd302d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,32 @@ +# EditorConfig — https://editorconfig.org +# +# Locks the whitespace conventions the codebase already uses so editors +# don't silently rewrite them. Lint catches some of this (no-tabs etc.) +# but EditorConfig acts on file-open, before code is even written. + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 + +[*.{yml,yaml}] +# YAML's anchor/alias semantics get touchy at >2 spaces; matches the +# existing .github/workflows + .woodpecker convention. +indent_size = 2 + +[*.json] +indent_size = 2 + +[*.md] +# Trailing whitespace in Markdown can mean a hard line break — leave +# it alone rather than letting the editor strip it. +trim_trailing_whitespace = false + +[Makefile] +# tabs are required by make +indent_style = tab