npm install -D oxfmt
npx oxfmt --migrate prettier
"format": "oxfmt --check",
"format:fix": "oxfmt",
npm run format
npm run format:fix
こちらをインストールします https://open-vsx.org/extension/oxc/oxc-vscode
設定
{
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file" // tell oxfmt to format the whole file, not only the modified lines
// Or enable it for specific file types:
// "[javascript]": {
// "editor.defaultFormatter": "oxc.oxc-vscode"
// },
}