Skip to content

fix(fmt): support embedded TypeScript in Vue and Svelte - #327

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-fmt-embedded-typescript
Aug 12, 2026
Merged

fix(fmt): support embedded TypeScript in Vue and Svelte#327
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-fmt-embedded-typescript

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

rs fmt incorrectly treats embedded TypeScript in Vue and Svelte files as JavaScript because the Yuku parser derives the language from the host file extension. This keeps the fast extension-based path for regular JavaScript and TypeScript files while falling back to source-based TypeScript or TSX detection for embedded code. CLI-level coverage verifies Vue TypeScript and TSX as well as Svelte instance and module scripts.

Related Links

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: e96cf63
Status: ✅  Deploy successful!
Preview URL: https://f94beb92.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-fix-fmt-embedded.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit bd500af into main Aug 12, 2026
5 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/fix-fmt-embedded-typescript branch August 12, 2026 04:22
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