GitShow/sveltejs/prettier-plugin-svelte
sveltejs

prettier-plugin-svelte

Format your svelte components using prettier.

by sveltejs
Star on GitHubForknpm

TypeScript

817 stars102 forks44 contributorsQuiet · 2mo agoSince 2018prettier-plugin-svelte@4.1.1MIT

Meet the team

See all 44 on GitHub →
dummdidumm
dummdidumm180 contributions
jamesbirtles
jamesbirtles61 contributions
Conduitry
Conduitry36 contributions
dependabot[bot]Bot
dependabot[bot]20 contributions
jarrodldavis
jarrodldavis16 contributions
ehrencrona
ehrencrona10 contributions
jrmajor
jrmajor6 contributions
github-actions[bot]Bot
github-actions[bot]4 contributions

Languages

View on GitHub →
TypeScript63.7%
HTML35.4%
JavaScript0.9%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
50
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 2mo ago
See all on GitHub →
cpruijsen
fix: preserve parentheses around {#each} TypeScript as assertionsOpenPR

Summary was printed as . The compiler drops grouping parentheses from the each-block expression AST, and Prettier then omits them as unnecessary in JS, so the TypeScript is concatenated into the context keyword. Wrap expressions whose AST type is so the assertion stays parenthesized. Fixes #486. Decision Chose: wrap when . Alternative: preserve every user-written grouping parenthesis around each-block expressions (or also wrap / angle-bracket assertions). Why: same idea as , only wrap when 's would otherwise collide with TypeScript . Sequence expressions already get parens from Prettier; is the hole. Happy to widen the predicate if you want that. The case from the issue comment is already handled by the existing parentheses fix (#501 / #503); this PR does not change that path. Test plan [x] fails without the wrap and passes with it [x] Existing printer samples, , and still pass

cpruijsen · 2w ago
blaumeise20
Line break incorrectly placed before `>`, not afterOpenIssue

Take this code and format it: This is the output: This would look better:

blaumeise20 · 1mo ago
ghost
plugin inserts prettier:content when using webstormOpenIssue

example svelte project using the default template: https://github.com/theweekendgeek/svelte-prettier-example) This s happening in WebStorm, I could not yet reproduce this in Visual Studio Code. I would assume that other IDEs from Jetbrains behave the same. Not sure If I might need to be raising this issue with them, because of the way the IDE calls Prettier for example. How to reproduce: 1. open project in webstorm 2. in Settings -> Prettier: make sure prettier package is selected, add svelte extension to . Check and 3. open 4. select 5. type opening curly brace to surround with curly braces 6. prettier:content is inserted instead of reformatted code What I have found out so far: In General I can call the action without problems. I will format the code as expected, except when I have just done the sequence above and pressed . In this case the same result as above will shown. I can workaround the issue by disabling the option in the Prettier Settings.

ghost · 2mo ago
Structured data for AI agents

Repository: sveltejs/prettier-plugin-svelte. Description: Format your svelte components using prettier. Stars: 817, Forks: 102. Primary language: TypeScript. Languages: TypeScript (63.7%), HTML (35.4%), JavaScript (0.9%). License: MIT. Latest release: prettier-plugin-svelte@4.1.1 (3mo ago). Open PRs: 11, open issues: 46. Last activity: 2mo ago. Community health: 50%. Top contributors: dummdidumm, jamesbirtles, Conduitry, dependabot[bot], jarrodldavis, ehrencrona, jrmajor, github-actions[bot], clebert, orlov-vo and others.

·@ofershap

Replace github.com with gitshow.dev