oxfmt

VoidZero Inc. & Contributors · oxc-project.oxfmt

Oxfmt is a high-performance formatter for the JavaScript ecosystem.

Oxfmt is a high-performance formatter for the JavaScript ecosystem. - Supported languages JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Angular, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL, Ember, Handlebars - Built for scale Oxfmt targets large codebases and CI environments, with an emphasis on high throughput and predictable performance. It is built on the Oxc compiler stack and avoids architectural bottlenecks common in existing formatter implementations. Our benchmarks show Oxfmt to be approximately 30x faster than Prettier and 2x faster than Biome. - Batteries included - Oxfmt includes built-in features that typically require external Prettier plugins: - Import sorting - Tailwind CSS class sorting - package.json field sorting - Embedded formatting (CSS-in-JS, GraphQL, etc.) - Prettier-compatible Oxfmt integrates into existing Prettier-based workflows. The oxfmt CLI behaves similarly to Prettier by default, allowing adoption with minimal changes to scripts and tooling. Oxfmt matches Prettier’s JavaScript formatting. When migrating from recent versions of Prettier, formatting differences should not occur; any differences are considered bugs. Oxfmt currently passes approximately 95% of Prettier's JavaScript and TypeScript test suite. The remaining cases are niche scenarios, and we work with the Prettier team to converge on formatting over time. No additional dependencies or configuration needed.

winget install --id oxc-project.oxfmt --exact --source winget

Latest 0.44.0

Release Notes

Table of Contents

  • Oxlint v1.59.0
  • Oxfmt v0.44.0

Oxlint v1.59.0

πŸ’₯ BREAKING CHANGES

  • 22ce6af oxlint/lsp: [BREAKING] Show/fix safe suggestions by default (#19816) (Sysix)

πŸš€ Features

  • 7a7b7b8 oxlint/lsp: Add source.fixAllDangerous.oxc code action kind (#20526) (bab)
  • 9cfe57e linter/unicorn: Implement prefer-import-meta-properties rule (#20662) (Irfan - ئىرفان)
  • 1edb391 linter/eslint: Implement no-restricted-exports rule (#20592) (Nicolas Le Cam)
  • 0f12bcd linter/react: Implement hook-use-state rule (#20986) (Khaled Labeb)
  • 1513a9f oxlint/lsp: Show note field for lsp diagnostic (#20983) (Sysix)
  • 7fdf722 linter/unicorn: Implement no-useless-iterator-to-array rule (#20945) (Mikhail Baev)
  • 39c8f2c linter/jest: Implement padding-around-after-all-blocks (#21034) (Sapphire)
  • ac39e51 linter/eslint-vitest-plugin: Prefer importing vitest globals (#20960) (Said Atrahouch)
  • 0b84de1 oxlint: Support allow option for prefer-promise-reject-errors (#20934) (camc314)
  • 23db851 linter/consistent-return: Move rule from nursery to suspicious (#20920) (camc314)
  • 9a27e32 linter/no-unnecessary-type-conversion: Move rule from nursery to suspicious (#20919) (camc314)
  • 1ca7b58 linter/dot-notation: Move rule from nursery to style (#20918) (camc314)
  • 73ba81a linter/consistent-type-exports: Move rule from nursery to style (#20917) (camc314)
  • b9199b1 linter/unicorn: Implement switch-case-break-position (#20872) (Mikhail Baev)
  • 3435ff8 linter: Implements prefer-snapshot-hint rule in Jest and Vitest (#20870) (Said Atrahouch)
  • 98510d2 linter: Implement react/prefer-function-component (#19652) (Connor Shea)
  • 871f9d9 linter: Implement no-useless-assignment (#15466) (Zhaoting Zhou)
  • 0f01fbd linter: Implement eslint/object-shorthand (#17688) (yue)

πŸ› Bug Fixes

  • 8be4de7 linter/unicorn: Do not report on optionals in prefer-array-flat-map (#21082) (Mikhail Baev)
  • dd2df87 npm: Export package.json for oxlint and oxfmt (#20784) (kazuya kawaguchi)
  • 9bc77dd linter/no-unused-private-class-members: False positive with await expr (#21067) (camc314)
  • 60a57cd linter/const-comparisons: Detect equality contradictions (#21065) (camc314)
  • 2bb2be2 linter/no-array-index-key: False positive when index is passed as function argument (#21012) (bab)
  • 6492953 linter/no-this-in-sfc: Only flag this used as member expression object (#20961) (bab)
  • 9446dcc oxlint/lsp: Skip node_modules in oxlint config walker (#21004) (copilot-swe-agent)
  • af89923 linter/no-namespace: Support glob pattern matching against basename (#21031) (bab)
  • 64a1a7e oxlint: Don't search for nested config outside base config (#21051) (Sysix)
  • 3b953bc linter/button-has-type: Ignore document.createElement calls (#21008) (Said Atrahouch)
  • 8c36070 linter/unicorn: Add support for Array.from() for prefer-set-size rule (#21016) (Mikhail Baev)
  • c1a48f0 linter: Detect vitest import from vite-plus/test (#20976) (Said Atrahouch)
  • 5c32fd1 lsp: Prevent corrupted autofix output from overlapping text edits (#19793) (Peter Wagenet)
  • ca79960 linter/no-array-index-key: Move span to key property (#20947) (camc314)
  • 2098274 linter: Add suggestion for jest/prefer-equality-matcher (#20925) (eryue0220)
  • 6eb77ec linter: Allow default-import barrels in import/named (#20757) (Bazyli BrzΓ³ska)
  • 9c218ef linter/eslint-vitest-plugin: Remove pending fix status for require-local-test-context-for-concurrent-snapshot (#20890) (Said Atrahouch)

⚑ Performance

  • fb52383 napi/parser, linter/plugins: Clear buffers and source texts earlier (#21025) (overlookmotel)
  • 3b7dec4 napi/parser, linter/plugins: Use utf8Slice for decoding UTF-8 strings (#21022) (overlookmotel)
  • 012c924 napi/parser, linter/plugins: Speed up decoding strings in raw transfer (#21021) (overlookmotel)
  • 55e1e9b napi/parser, linter/plugins: Initialize vars as 0 (#21020) (overlookmotel)
  • c25ef02 napi/parser, linter/plugins: Simplify branch condition in deserializeStr (#21019) (overlookmotel)
  • 9f494c3 napi/parser, linter/plugins: Raw transfer use String.fromCharCode in string decoding (#21018) (overlookmotel)
  • 0503a78 napi/parser, linter/plugins: Faster deserialization of raw fields (#20923) (overlookmotel)
  • a24f75e napi/parser: Optimize string deserialization for non-ASCII sources (#20834) (Joshua Tuddenham)

πŸ“š Documentation

  • af72b80 oxlint: Fix typo for --tsconfig (#20889) (leaysgur)
  • 70c53b1 linter: Highlight that tsconfig is not respected in type aware linting (#20884) (camc314)

Oxfmt v0.44.0

πŸš€ Features

  • 35cf6e8 oxfmt: Add node version hint for ts config import failures (#21046) (camc314)

πŸ› Bug Fixes

  • dd2df87 npm: Export package.json for oxlint and oxfmt (#20784) (kazuya kawaguchi)
  • 9d45511 oxfmt: Propagate file write errors instead of panicking (#20997) (leaysgur)
  • 139ddd9 formatter: Handle leading comment after array elision (#20987) (leaysgur)
  • 4216380 oxfmt: Support .editorconfig tab_width fallback (#20988) (leaysgur)
  • d10df39 formatter: Resolve pending space in fits measurer before expanded-mode early exit (#20954) (Dunqing)
  • f9ef1bd formatter: Avoid breaking after => when arrow body has JSDoc type cast (#20857) (bab)

Installer type: zip

Architecture Scope Download SHA256
x64 β€” Download 580D8AA63C670353A766AAA78C54DE0FB5C74B347A822EA1578148AB75E399A8
arm64 β€” Download 5920EA5CC5C6D70A3003BCE926A4E82BFD04C7922341BADAA5572F901DF4114A

Details

Homepage
https://oxc.rs/docs/guide/usage/formatter.html
License
MIT
Publisher
VoidZero Inc. & Contributors
Support
https://github.com/oxc-project/oxc/issues
Copyright
Copyright (c) 2024-present VoidZero Inc. & Contributors
Moniker
oxfmt

Tags

formatterjavascripttypescript

Older versions (10)

0.43.0
Architecture Scope Download SHA256
x64 β€” Download A99D2F6A076A8955A2014F8A3DAD16146D4C67FDBD44A886091ED3891A384341
arm64 β€” Download AAFCD89F355BE7F577B269CFB4C23FC9BE74963E5AD181476EA0CF9B8D27A173
0.42.0
Architecture Scope Download SHA256
x64 β€” Download 8DD144E5152AAEF5D5191D963683F060582DF3D58A3C67E98A2BB9AF515A1D59
arm64 β€” Download D88D825725A1AEF06AC2C9AF663D787464CEB56BDB514DD527C294A6885E4C23
0.41.0
Architecture Scope Download SHA256
x64 β€” Download 187A8CBF96D2644536D0F1159B403A0732C548DDF2BA46B241566165C530C3BD
arm64 β€” Download 727AB7BD3B13CB49483D3F4AE5FA4EC2F8D4FB2F9C342D6C0191383BDD937F29
0.40.0
Architecture Scope Download SHA256
x64 β€” Download 0C1122EEFC5EB4597A607ECDC8155744ADAE5A18AED1F0B45416FB18A43952B7
arm64 β€” Download 7A6AB939F779E4FAB35F59B1E9873E90EB5B8130FD473E70900D98221254506C
0.39.0
Architecture Scope Download SHA256
x64 β€” Download FE9FE16866D4547411B0D38CD044AE25DA4C121ED18FCECC75D3B05B6F815AB0
arm64 β€” Download 1D762582D761DFC2635F3AA364BD05510A30D19B5DE7016585853DD924E35CB6
0.36.0
Architecture Scope Download SHA256
x64 β€” Download 85416EFA923320E97484C71D25A952B488921CB79C829FF2AB462612BCC8B1EB
arm64 β€” Download 544DC778A7810A6649A786FEEE313124537873A55FFD36B2D69D17BE5FCDC4C1
0.35.0
Architecture Scope Download SHA256
x64 β€” Download 1C116948C5B02CD57A6F34F1E577695DD04168A45A31515A7507A5EE75F5D7BD
arm64 β€” Download 27A30E5F9B197AFDCB5620A170F5AE32FE6FB13DE0334AA6920CFD1F3416EF08
0.34.0
Architecture Scope Download SHA256
x64 β€” Download ACCDFA251DBD52B6018B479DC9885FB892DB2BBBC290B8AA79C3AD7B7D33FC6E
arm64 β€” Download 5343B85B2D9100EB5AB779681A72FAAE9BCBE7D4149DEE9E702FF06B0C2CCF29
0.33.0
Architecture Scope Download SHA256
x64 β€” Download FD87800A3FB03BC5BFC373E8BE3B37F19A097070D9D656137EA744787CFC7845
arm64 β€” Download FFCA31511ECC450E45EBA5C9918C866DE567888849F4CE2366B8D5110862422E
0.28.0
Architecture Scope Download SHA256
x64 β€” Download FB212A86CEC43120AE8A246105E48210B9E7CAE9B905B173D375DA5ECE2EF332
arm64 β€” Download 01EF009A38A21F17CB8FD0A8A68D3C697164772EF7E14CEFFC9C707C59944EA1