@swiftuijs/twill-formatter weekly downloads statistics
By swiftuijs · npm · Prettier plugins
Prettier plugin for Twill: format trailing closures, guards, defer and TS/TSX while preserving source syntax.
@swiftuijs/twill-formatter has 46 recorded weekly downloads on npm, a change of -92.9% over the past 7 days, ranking #1850 of 2,391 tracked listings.
About @swiftuijs/twill-formatter
<img src="https://twill.evecalm.com/logo.png" alt="Twill hummingbird" align="right" width="40" height="40" /> Twill formatter
Prettier 3.9 plugin for Twill, a TypeScript-based language with Swift-inspired syntax extensions. Formats .twill, .twillx and native TS/TSX while preserving trailing closures, guards and defer. It uses Prettier's own TypeScript parser/printer; compilation helpers never enter formatted source.
Install in your application:
pnpm add -D @swiftuijs/twill-formatter prettier
.prettierrc.json:
{ "plugins": ["@swiftuijs/twill-formatter"], "singleQuote": true }
pnpm exec prettier --write 'src/**/*.{twill,twillx,ts,tsx,js}'
pnpm exec prettier --check .
The API format(source, { filepath: 'view.twillx' }) returns a promise. The default export is a standard Prettier plugin. Ordinary TS/JS keeps its normal Prettier parser. Explicit parentheses around component-like callees are retained because they affect Twill semantics. Invalid source fails formatting with a syntax diagnostic.
The VSIX bundles this formatter and supports Format Document and format-on-save without a separate Prettier extension. Its built-in provider uses editor indentation and Prettier defaults. Use the standard Prettier extension with this workspace plugin when you need project-wide Prettier configuration.
For generated-source viewers, formatGenerated(code, { filepath: 'output.ts' }) formats native TS/TSX directly. Use output.tsx for JSX. It returns display text without a source map; retain the original compiler result for builds, diagnostics and debugger mappings. format() remains the dialect-source formatter.
Browser workers and the VSIX use @swiftuijs/twill-formatter/standalone. It exposes the same formatting helpers and loads only Prettier's core, the TS/ESTree support and the Twill plugin. Additional plugins must be loaded objects; this entry does not resolve plugin filenames or load configuration from disk. The main entry retains ordinary Node Prettier integration. Both entries are tested for matching formatting and idempotence.
Documentation · Issues · MIT licensed · Built by forth.ink.
Added in 0.2.0
Twill 0.2.0 adds if const value = lookup() { use(value); } with branch-local nullish bindings and native destructuring. Group trailing calls in initializers, following Swift’s condition boundary. It emits native branches without a helper, closure or optional wrapper. See syntax and RFC 0018.
Twill 0.2.0 includes associated-value enums and match expressions: match (state) { case State.loaded({ value }): value; default: 0; }. Named payload bindings and erased factory descriptors compile to native switches without calling factories. Native switch statements retain JS fallthrough; match and switch expressions return one result without fallthrough. Use the coordinated 0.2.0 packages and extension. Compiler, formatter, linter, highlighter, export and editor changes are validated together. See syntax and compatibility and RFC 0016.
Development
This package's implementation uses Twill and emits ordinary JavaScript. Build and check a checkout with the workspace tools; see developing tooling in Twill for bootstrap and contribution instructions.
Description from the npm listing.
- twill
- prettier
- prettier-plugin
- typescript
- formatter
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (544)Similar npm Prettier plugins plugins
All 20 @swiftuijs/twill-formatter alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@swiftuijs/twill-formatter. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.