Vue: Auto-format/lint: move <script> before <template> tags

Viewed 23

Is there a way to configure ESLint/Prettier or similar tooling to automatically refactor .vue files in a way that <script> tag will be moved to the beginning of the file above the <template> tag?

From:

<template>
  …
</template>

<script>
  …
</script>

To:

<script>
  …
</script>

<template>
  …
</template>
1 Answers
Related