Utilities
Format JavaScript or TypeScript with Oxfmt
oxfmt-format is a single-file JavaScript and TypeScript formatting node powered by Oxfmt.
0.71.0 on Trickest
Free plan: 1 user, 3 execution slots, no card.
overview
What oxfmt-format does
Format one JavaScript, JSX, TypeScript or TSX file on stdin with Oxfmt. Choose the parser with language; js is the default. Fixed settings use two spaces, semicolons, double quotes, width 80 and LF line endings, with embedded-language formatting disabled.
The wrapper ignores nested project configuration and uses a synthetic stdin filename for the chosen parser, so a supplied output.txt works. Input is limited to 5 MiB and formatting to 60 seconds; the Node heap is 512 MiB and output limit is 20 MiB. Empty source is valid.
Input or native processing failures fail the operation. The operation keeps the supplied source unchanged.
This operation uses 0.71.0. Upstream license: MIT. The source link identifies the program used by this node.
source github.com/oxc-project/oxc/tree/oxfmt_v0.71.0/npm/oxfmt · 0.71.0 on Trickest
image quay.io/trickest/oxfmt-format:0.71.0
use cases
oxfmt-format use cases
Format a JavaScript snippet
Format one JS file with the bundled fixed settings.
Select a TypeScript parser
Set language to ts or tsx for TypeScript syntax.
Use consistent source formatting
Return a formatted copy without executing source or discovering package scripts.
reference
oxfmt-format inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| input | FILE | --input | UTF-8 source file up to 5 MiB. Filename extension does not matter. Fixed config uses two spaces, semicolons, double quotes, width 80 and LF line endings. |
| language | STRING | --language | Parser language; one of js, jsx, ts or tsx. Defaults to js. Formatting times out after 60 seconds. |
Showing key inputs. oxfmt-format exposes 2 inputs in total.
example
oxfmt-format command examples
/app/run.sh --input ./input.txt --language js ./outputconst answer = { value: 42, label: "hello" };
function add(a, b) {
return a + b;
}guidance
oxfmt-format vs alternatives
Choose Oxfmt for a formatted source file. Formatting does not transpile or type-check TypeScript, and it does not run the program or load repository scripts.
| Tool | Pick it when |
|---|---|
| black-format | Formats Python; Oxfmt handles JS, JSX, TS and TSX. |
faq
oxfmt-format FAQ
related
More Utilities tools
dnsgen
Wordlist and mined-word subdomain permutation.
pup
CSS selectors over HTML, the jq counterpart for markup.
unfurl
Extract chosen URL parts from stdin into clean line lists.
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
Run oxfmt-format yourself
The synthetic run checks formatted source. The excerpt shows exact text asserted by saved passing platform verifier; recovered from fixture assertion, not a newly downloaded artifact. The command shown is the container entrypoint with example paths, not a host-installed CLI command.
Facts on this page come from the live Trickest tool library.