Fixed editors auto-reformatting Koenig files on save - #29181
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis pull request updates linting and formatting configuration. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
no ref - kg-default-nodes, kg-lexical-html-renderer, and koenig-lexical carry prettier as a devDependency purely for normalising HTML strings in test assertions - Zed enables prettier formatting per-package when it finds a prettier dependency, and with no prettier config in the repo it applies prettier defaults, rewriting whole files on save and polluting PRs with unrelated changes - a catch-all .prettierignore in each package switches off editor-driven prettier formatting without affecting the tests, which call the prettier API directly with explicit options - also added ./koenig/*/ to eslint.workingDirectories so the VS Code ESLint extension treats Koenig packages as separate working directories, matching the old Koenig repo's ./packages/*/ setting
8d157f9 to
5f58f3f
Compare
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 10m 44s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 41s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 1s | View ↗ |
nx run-many -t test:unit -p @tryghost/kg-defaul... |
✅ Succeeded | 6m 21s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 53s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 3m 20s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 3m 3s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 45s | View ↗ |
Additional runs (6) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-08 16:32:34 UTC

no ref
Since the Koenig monorepo merge, editing a file under
koenig/in Zed rewrites the whole file on save (prettier defaults: double quotes, added brace spacing, trailing commas, 80-col wrapping), polluting PRs with unrelated changes. Other directories in the repo are unaffected, and the Koenig code itself is fine — the whole tree already passes ESLint's autofix with zero changes under the sameeslint-plugin-ghoststyle Ghost uses.The trigger is that
kg-default-nodes,kg-lexical-html-renderer, andkoenig-lexicalare the only packages in the repo withprettieras a devDependency (used purely to normalise HTML strings in test assertions). Zed enables prettier formatting per-package when it finds a prettier dependency, and with no prettier config anywhere it formats with prettier defaults..prettierignoreto each of the three packages so editor-driven prettier formatting is switched off exactly where the test-only dependency exists (respected by Zed, monorepo-aware, takes precedence over any root config). The tests are unaffected as they call the prettier API directly with explicit options../koenig/*/toeslint.workingDirectoriesin.vscode/settings.jsonso the VS Code ESLint extension treats Koenig packages as separate working directories, matching the old Koenig repo's./packages/*/setting and the existingapps/*/ghost/*entries.