From 99bda289a635c70ffa62b25cbacdaa540a6f27ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 10 Sep 2026 21:47:08 +0000 Subject: [PATCH] :memo: Document .editorconfig as oxfmt fallback Recommend `EditorConfig.EditorConfig` in .vscode/extensions.json so editors without native `.editorconfig` support pick it up, and add an "Editor configuration" section to CONTRIBUTING.md: `.editorconfig` is an editor-compatibility fallback for the file types oxfmt does not format (shell scripts, dotfiles, the commit-message template, git's `COMMIT_EDITMSG` buffer), with `.oxfmtrc.json` authoritative where both apply. `.editorconfig` itself is unchanged. --- .vscode/extensions.json | 3 ++- CONTRIBUTING.md | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7b553a3..d826373 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "oxc.oxc-vscode", "streetsidesoftware.code-spell-checker", "typescriptteam.native-preview", - "sandy081.todotasks" + "sandy081.todotasks", + "EditorConfig.EditorConfig" ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9253d01..9cb9e82 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,6 +13,10 @@ CI and review will bounce these even though `npm run check` and the linters don' - **New work starts with `npm run create:branch`, never a hand-written `git switch -c`/`git checkout -b`.** The command carries the branch precondition; branching around it skips the clean-tree, current-`main` and green-baseline checks, and the skip is invisible until a failure can no longer be attributed. (see [Branching model](#branching-model)) - **There is no local `npm run publish`, and `publish:publint` / `publish:attw` don't go in `check`.** (see [Publishing workflow](#publishing-workflow)) +## Editor configuration + +`.editorconfig` is for editor compatibility, not a gate — it is a sane fallback for the files oxfmt does not format (shell scripts, dotfiles, `LICENSE`, the commit-message template, and git's `COMMIT_EDITMSG` buffer). Where both apply, `.oxfmtrc.json` is authoritative: oxfmt is the formatter, and the overlapping `.editorconfig` keys only keep non-oxfmt editors close to the formatted result. + ## Commit messages Gitmoji subject, imperative mood, 50/72 wrapping. The template is `commit-message-template`; run `npm run setup:git-commit-message` once after cloning to register it as git's `commit.template` (or `npm run setup` to run every one-time clone step).