Post

tsv 0.6 is out, near-production-ready formatters/parsers for TypeScript/JS, CSS, and Svelte - 2.2x faster than oxfmt for TS single-threaded, 3.6x CSS - wasm builds for browsers (oxfmt ships none) - CLI formatting is 3x faster than rsvelte-fmt - vscode/openvsx extension tsv.fuz.dev/docs/benchma...

tsv.fuz.devbenchmarks - tsv.fuz.devPrecise language tools for TypeScript/JS, CSS, and Svelte in Rust: a formatter that closely follows Prettier and a drop-in for Svelte's parser.

The format style is hardcoded to Prettier + Svelte's config which uses trailingComma:none ... save tokens! Svelte formatting also respects version 5's HTML-diverging whitespace trimming rules, making common warty cases readable (a bigger motivation for starting this project than I'd like to admit)

tsv turns 1 year old at the end of the month. I originally published with a squashed history, but it now includes 47 commits condensing the pre-release history. It's my first serious LLM-generated project, and the benchmarks appear to justify the effort. I'll blog about it soon.

The project is still rough in spots, but it also fixes numerous bugs in the reference tools. The repo documents many bugs and quirks observed in Prettier, prettier-plugin-svelte, acorn-typescript, and Svelte's parser. I submitted some fixes this year, and there's a lot more I want to contribute.

Feedback welcome! The hardcoded formatting style is for simplicity and to avoid depending on a JS runtime for Prettier-compat config, which has perf costs and deployment downsides. Extensions: marketplace.visualstudio.com/items?itemNa... open-vsx.org/extension/fu... Repo: github.com/fuzdev/tsv

github.comGitHub - fuzdev/tsv: precise language tools for TypeScript/JS, CSS, and Svelte in Rustprecise language tools for TypeScript/JS, CSS, and Svelte in Rust - fuzdev/tsv

0 reposts1 like