![Graphic for bun fmt and bun lint --staged. Format and lint only what you're committing. One line in a git hook, nothing to install. Step 1, create this file: .git/hooks/pre-commit, a plain text file made executable with chmod +x, containing "#!/bin/sh" and "bun fmt --staged && bun lint --staged". Step 2, commit: a terminal runs git commit -m "add cart". bun fmt prints "src/cart.ts" and "Formatted 1 file, 0 unchanged [8.10ms]", with a sticker reading "re-staged". bun lint then prints a code frame pointing at a debugger statement in src/cart.ts line 2, "error: Unexpected 'debugger' statement. no-debugger", "1 problem (1 error, 0 warnings)" and "Linted 1 file [7.94ms]". A stamp reads "commit blocked".](https://pbs.twimg.com/media/HUrPzjragAAAruk.jpg?name=small&format=webp)
ALT Graphic for bun fmt and bun lint --staged. Format and lint only what you're committing. One line in a git hook, nothing to install. Step 1, create this file: .git/hooks/pre-commit, a plain text file made executable with chmod +x, containing "#!/bin/sh" and "bun fmt --staged && bun lint --staged". Step 2, commit: a terminal runs git commit -m "add cart". bun fmt prints "src/cart.ts" and "Formatted 1 file, 0 unchanged [8.10ms]", with a sticker reading "re-staged". bun lint then prints a code frame pointing at a debugger statement in src/cart.ts line 2, "error: Unexpected 'debugger' statement. no-debugger", "1 problem (1 error, 0 warnings)" and "Linted 1 file [7.94ms]". A stamp reads "commit blocked".

ALT Poster for bun fmt, a Prettier-compatible formatter built into Bun. Headline: 320x faster than Prettier. Bar chart of wall-clock time to run --check on microsoft/vscode (10,148 files, 8 cores): bun fmt 0.43 s, oxfmt 0.72 0.85 s (2x slower), Biome 2.5 3.6 s (8.3x slower), Prettier 3.9.9 139 s (320x slower). Formats 20 languages: JavaScript, TypeScript, JSX, Flow, HTML, Vue, Angular, Handlebars, MJML, CSS, SCSS, Less, JSON, JSONC, JSON5, YAML, TOML, GraphQL, Markdown and MDX. 99% of Prettier's tests pass (9,728 of 9,821). 5x less memory than Prettier (183 MB vs 972 MB).

ALT Announcement graphic for bun check, a TypeScript type checker built into Bun, with the Bun logo. A bar chart compares type checking VS Code (10,947 files). bun check: 1.75s, 2.77 GiB. tsc 7 with --checkers 16: 5.88s, 9.23 GiB. tsc 7 (typescript-go) with default settings: 12.58s, 7.73 GiB. bun check is 3x to 7x faster with 2.8x to 3.3x less memory. Linux x64, 64 threads, mean of 20 runs. Passes 100% of TypeScript's conformance tests. "Thank you, TypeScript team. bun check is a port of typescript-go."




























