NewsCrawler.org

tidy: a fast Rust-based formatter that styles code like Prettier

tidy: a fast Rust-based formatter that styles code like Prettier
Image: news.hada.io

tidy is a code formatter written in Rust that applies the same code style as Prettier and runs as a single executable without Node.js.[1] It handles JavaScript, TypeScript, JSX, HTML, Vue, CSS, SCSS, Less, Markdown, JSON, YAML, GraphQL, TOML, XML, Dockerfile and INI without separate plugins, and it also formats other languages embedded in a file, such as CSS inside JavaScript template strings. In its own benchmark, it checked 12,071 files in 280 ms, about 66 times faster than Prettier's 18.5 seconds on an M1 Max. The project compares its output with Prettier byte by byte and documents differences, such as changed code meaning or results that change on repeated runs. Commands include tidy check, tidy up and --changed, and tidy init imports existing Prettier or oxfmt settings. The project also ships a Rust library and a Node.js binding called tidyrs.[2]

Repository tidy github.com

Stars: 130Forks: 2License: MITUpdated:

Read the original github.comDiscussion on GeekNews

Sources

  • KRGeekNews KO

    tidy - Prettier 스타일로 코드를 정리하는 Rust 기반 고속 포매터

    7 points0 comments

Published: First seen: Читать по-русски

Open as a page