CLI tool to automatically reorder Vue 3 <script setup> blocks into a consistent structure.
npm install vue-script-setup-reorder> A CLI codemod to automatically reorder Vue 3 blocks
> Built to enforce team structure, reduce review noise, and stay editor‑agnostic.
---
In many teams, Vue files grow organically and reviews often include comments like:
> “Can you move computed above watches?”
> “Please keep stores at the top.”
This tool eliminates those discussions by encoding the agreed structure into automation.
> If the computer can enforce it, humans shouldn’t argue about it.
---
For Vue 3 components using:
``vue`
`ts`
---
This tool is editor‑agnostic.
Instead of plugins, simply call the CLI.
1. Preferences → Tools → External Tools
2. Program: vue-reorder $FilePath$
3. Arguments: $ProjectFileDir$
4. Working directory:
`json`
{
"label": "Reorder Vue script setup",
"type": "shell",
"command": "vue-reorder",
"args": ["${file}"]
}
---
- ✅ Uses Prettier programmatically
- ❌ Does not run ESLint on your project
- ❌ Does not ship any ESLint config
Your project stays fully in control.
---
- Only