Format
vp fmt formats code with Oxfmt.
Overview
vp fmt is built on Oxfmt, the Oxc formatter. Oxfmt has full Prettier compatibility and is designed as a fast drop-in replacement for Prettier.
Use vp fmt to format your project, and vp check to format, lint and type-check all at once.
Usage
bash
vp fmt
vp fmt --check
vp fmt . --writeConfiguration
Put formatting configuration directly in the fmt block in vite.config.ts so all your configuration stays in one place. We do not recommend using .oxfmtrc.json with Vite+.
For the upstream formatter behavior and configuration reference, see the Oxfmt docs.
ts
import { defineConfig } from 'vite-plus';
export default defineConfig({
fmt: {
singleQuote: true,
},
});