Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]A formatting exception occurs when a vue file uses setup and there is only import code in setup and no semicolon ending #139

Open
snadn opened this issue Nov 28, 2024 · 3 comments

Comments

@snadn
Copy link

snadn commented Nov 28, 2024

<script setup>
import A from "./A.vue";
import B from "./B.vue"
</script>

<template>
  <div>
    <A />
    <B />
  </div>
</template>

format to

<script setup>
import A from "./A.vue";
import B from "./B.vue"; /* PartiallyEnd: #3632/scriptSetup.vue */
import B from "./B.vue";
</script>

<template>
  <div>
    <A />
    <B />
  </div>
</template>

prettier: v3.4.1
prettier-plugin-organize-imports: v4.1.0
vue-tsc: v2.1.10

@simonhaenisch
Copy link
Owner

@johnsoncodehk I guess this would be a bug in vue-tsc?

@bmulholland
Copy link

It's logged there as vuejs/language-tools#5110

@bmulholland
Copy link

bmulholland commented Jan 13, 2025

Notably, the OP here says this happens with vue-tsc 2.1.10, but I can only repro with vue-tsc 2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants