Prettier Version: 12.1.1
ESLint Version: 3.0.20
Framework: Vue 3 (Setup Script)
Operating System: macOS 15 / 26.2
Steps to reproduce
- Write code containing a
computed array in Vue 3 (see Input Code example below)
- Attempt to delete a single line (e.g., delete
const { t } = useI18n())
- Trigger Prettier + ESLint auto-formatting (save file / manual formatting)
- Notice that the line below the deleted line is incorrectly removed
- This issue does NOT occur when rolling back Prettier to version 11.0.2
Input Code
<script setup lang="ts">
const { t } = useI18n()
const menuItems = computed(() => [
{ title: t("menus.mockGuide"), route: "/demo/mock" },
])
</script>
Actual Output
<script setup lang="ts">
{ title: t("menus.mockGuide"), route: "/demo/mock" },
])
</script>
Expected Output
<script setup lang="ts">
const menuItems = computed(() => [
{ title: t("menus.mockGuide"), route: "/demo/mock" },
])
</script>