JSPM

prettier-oxc-parser

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1366
  • Score
    100M100P100Q110202F
  • License MIT

Use oxc as a Prettier parser for JavaScript and TypeScript.

Package Exports

  • prettier-oxc-parser

Readme

prettier-oxc-parser npm

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: