Repository navigation
Format .svelte files with prettier-plugin-svelte - #46
Merged
Merged
Conversation
app/.prettierrc never loaded prettier-plugin-svelte, so `pnpm format` and the pre-commit Prettier check silently skipped every .svelte file. Editors that do format Svelte (the VS Code Svelte extension bundles the plugin) rewrote whole files on save, and that drift slipped past the hooks as thousands of lines of noise in feature diffs. Load the plugin and apply it once. Formatting only: the unminified Vite build is byte-identical ignoring whitespace, and the only text changes are reflowed paragraph copy, which HTML collapses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # app/src/components/panels/ElementList.svelte # app/src/components/panels/ElementProperties.svelte
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/.prettierrcnever loadedprettier-plugin-svelte, sopnpm formatand the pre-commit Prettier check silently skipped every.sveltefile. Editors that do format Svelte (the VS Code Svelte extension bundles the plugin) rewrote whole files on save, and that drift slipped past the hooks as thousands of lines of noise in feature diffs — e.g. the rider-weight / Enduro HUD work carried ~2,500 lines of reformat.This loads the plugin and applies it once, so format-on-save becomes a no-op and the hook enforces Svelte formatting going forward.
Formatting only: the unminified Vite build is identical before/after ignoring whitespace (JS and CSS); the only text-node differences are reflowed paragraph copy, which HTML collapses. No reflowed text sits in
whitespace-pre*elements.Merge order
Merge after the rider-weight and Enduro HUD PRs. This branch will then be rebased and the formatter re-run, rather than hand-resolving conflicts.
Test plan
prettier --check .passes with the plugin loaded🤖 Generated with Claude Code