Post

Announcing tsv - a formatter, parser, and future linter + more for Svelte + TypeScript/JS/HTML/CSS in Rust. - tailored to Svelte, no irrelevant bloat - emphasis on performance, no JS bridging - non-configurable, so hidden dir-specific state never changes behavior github.com/fuzdev/tsv tsv.fuz.dev

github.comGitHub - fuzdev/tsv: formatter, parser, and future linter + more for TypeScript, Svelte, and CSS, written in Rustformatter, parser, and future linter + more for TypeScript, Svelte, and CSS, written in Rust - fuzdev/tsv

rsvelte uses oxc, tsv has its own parser today tsv is ~6% slower formatting TS and oxfmt bundles+delegates to Prettier, so tsv's wasm is 9x faster formatting Svelte & 13x for CSS, natively 12x/17x oxlint bridges to JS for ESLint plugins, and oxfmt is planning Prettier plugins - tsv won't for perf

0 reposts2 likes

tsv is focused on Svelte+TS+CSS (can output Svelte's AST), oxc is a Biome-like generic language platform tsv won't support config options so filesystem state doesn't affect how it operates rsvelte started with a Svelte compiler, tsv's is deferred for now size-wise this means tsv is much smaller

tsv also addresses numerous quirks in Prettier whereas oxfmt went for compatibility, this limits tsv's appeal but long-term gives it more freedom to innovate another goal is tsv is to produce optimal artifacts -- `tsv` will have everything but e.g. the parser and formatter can be used a la carte

The rsvelte formatter is currently 101× faster than Prettier. We’ve also run corpus tests against more than 12,000 real-world Svelte files, with differences in only 15 files. In other words, the rsvelte formatter achieves a high level of compatibility with Prettier. github.com/baseballyama...

github.comGitHub - baseballyama/rsvelte: Rust-powered Svelte ecosystemRust-powered Svelte ecosystem. Contribute to baseballyama/rsvelte development by creating an account on GitHub.

Looking great! rsvelte's compatibility makes me more comfortable with tsv being opinionated and focused on performance. I'm close to a release that's near production-ready, and would like to include rsvelte in tsv's benchmarks - I could share with you for review before publishing if you'd like.