Package Exports
- prettier-oxc-parser
Readme
prettier-oxc-parser 
Use oxc as a Prettier parser for JavaScript and TypeScript.
Requires Prettier >= 3.5.3
Installation
$ npm install -D prettier-oxc-parser
$ yarn add -D prettier-oxc-parser
$ pnpm install -D prettier-oxc-parser
$ bun add -D prettier-oxc-parser
Add the plugin to your Prettier config:
{
"plugins": ["prettier-oxc-parser"]
}
Caveats
Flow inside .js
files via @flow
pragma is not supported.
Non stage 4 syntax proposal like defer import evaluation are not supported. For decorators see oxc#10921.
Few remaining AST issues, which will be fixed in the next release of oxc-parser, will make updates to your code if you use declare module a.b
, declare namespace a.b
oxc#10901 or /** @type {number} */ (parent[prop]) = 1
oxc#10929.
Some subtitle differences can appear in JS files and are, IMO, bugs in Prettier:
- Line breaks for multi-assginement statements prettier#17437
- Comments in if/else blocks without brackets prettier#17449
- Line breaks for optional call statements prettier#17457
- Empty directives prettier#17458