Skip to content

Load prettier-plugin-svelte so just format actually formats components - #3

Merged
asg017 merged 1 commit into
format-generated-filesfrom
load-prettier-svelte-plugin
Sep 25, 2026
Merged

asg017 merged 1 commit into
format-generated-filesfrom
load-prettier-svelte-plugin

Conversation

@asg017

@asg017 asg017 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator
🤖 Claude-generated PR description

Stacked on #2.

prettier-plugin-svelte has been a devDependency all along, but it was never
loaded — there is no prettier config anywhere in the repo, and prettier 3 does
not autoload plugins.

Without a parser for .svelte, prettier --check . silently skips those
files
during directory expansion. So just format and just format-check
have never touched a single Svelte component, while reporting success.

Asking for them explicitly is what exposes it:

$ npx prettier --check "src/**/*.svelte"
[error] No parser could be inferred for file ".../src/lib/StatusDot.svelte"
[error] No parser could be inferred for file ".../src/pages/detail/DetailPage.svelte"
[error] No parser could be inferred for file ".../src/pages/index/IndexPage.svelte"
Error occurred when checking code style in 3 files.

That is every component in the project.

Why now

Pre-existing on main, so not urgent on its own. It matters at this point in the
stack because the next PR adds just format-check to CI — where it would have
gone green while covering no UI code at all.

Scope

The config names only the plugin. Everything else stays on prettier defaults,
which the generated files in #2 depend on — verified that adding it leaves
api.d.ts and the page_data files untouched, so types-check-fresh is
unaffected.

Two of the three components needed reformatting; StatusDot.svelte was already
prettier-clean by luck.

Verification

Check Result
npx prettier --check "src/**/*.svelte" all matched files clean (was 3 parser errors)
just format-check GREEN, now genuinely covering Svelte
just types-check-fresh GREEN, unaffected
just telemetry-doc-check GREEN
just test 171, unchanged

just check is still red — that is the next PR's job.

🤖 Generated with Claude Code

@asg017
asg017 force-pushed the load-prettier-svelte-plugin branch from 7f9bde7 to 7667e0e Compare September 25, 2026 16:53
prettier-plugin-svelte has been a devDependency all along, but it was never
loaded: there is no prettier config anywhere in the repo, and prettier 3 does
not autoload plugins. Without a parser for .svelte, `prettier --check .`
silently skips those files during directory expansion, so `just format` and
`just format-check` have never touched a single Svelte component while
reporting success.

Asking for them explicitly is what exposes it:

    $ npx prettier --check "src/**/*.svelte"
    [error] No parser could be inferred for file ".../StatusDot.svelte"
    [error] No parser could be inferred for file ".../DetailPage.svelte"
    [error] No parser could be inferred for file ".../IndexPage.svelte"

That is every component in the project. Pre-existing on main, and it matters now
because PR 1 adds format-check to CI, where it would have gone green while
covering no UI code at all.

The config only names the plugin; everything else stays on prettier defaults,
which the generated files committed in the previous commit depend on. Verified
that adding it leaves api.d.ts and the page_data files untouched, so
types-check-fresh is unaffected.

Two of the three components needed reformatting. StatusDot.svelte was already
prettier-clean by luck.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@asg017
asg017 force-pushed the load-prettier-svelte-plugin branch from 7667e0e to dad87e1 Compare September 25, 2026 17:30
@asg017
asg017 added this pull request to stack #19 September 25, 2026 18:17
@asg017
asg017 merged commit fe6fe06 into main Sep 25, 2026
15 checks passed
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