{"library":"prettier-oxc-parser","title":"Prettier oxc Parser","description":"Use oxc as a Prettier parser for faster JavaScript and TypeScript formatting. Current stable version 0.2.0 (April 2025) requires Prettier >= 3.6.2. Releases are based on oxc-parser major updates. Differentiators: faster than default Prettier parsers for large TS projects, supports raw transfer on Node >= 22 for near-zero AST copy cost, and handles decorators in JS files since v0.2.0. Alternative to @prettier/plugin-oxc with better performance due to synchronous API and raw transfer.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-oxc-parser"],"cli":null},"imports":["// Add to Prettier config: \"plugins\": [\"prettier-oxc-parser\"]","import { format } from 'prettier'","const path = require('node:path')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// .prettierrc.json\n{\n  \"plugins\": [\"prettier-oxc-parser\"]\n}\n\n// Then format files with Prettier CLI or API:\n// npx prettier --write \"src/**/*.{js,ts,jsx,tsx}\"\n\n// Or programmatically:\nimport { format } from 'prettier';\n\nconst code = 'const x: string = \"hello\";';\nconst formatted = await format(code, {\n  parser: 'typescript',\n  plugins: ['prettier-oxc-parser']\n});\nconsole.log(formatted);","lang":"typescript","description":"Install the plugin, add to Prettier config, then format files using Prettier CLI or API with the plugin loaded.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}