Skip to content

Format .svelte files with prettier-plugin-svelte - #46

Merged
walkersutton merged 2 commits into
mainfrom
chore/prettier-svelte
Sep 30, 2026
Merged

walkersutton merged 2 commits into
mainfrom
chore/prettier-svelte

Conversation

@walkersutton

Copy link
Copy Markdown
Owner

Summary

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 — 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
  • ESLint passes
  • Build output diff (ignoring whitespace) is empty

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cyclemetry Ready Ready Preview Sep 30, 2026 4:17am UTC

Request Review

# Conflicts:
#	app/src/components/panels/ElementList.svelte
#	app/src/components/panels/ElementProperties.svelte
@walkersutton
walkersutton merged commit 366c96b into main Sep 30, 2026
2 checks passed
@walkersutton
walkersutton deleted the chore/prettier-svelte branch September 30, 2026 04:17

This branch was successfully deployed

1 active deployment
Preview — 65c5331d Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant