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

Indentation removed on Svelte <script> tag first line. #89

Closed
notramo opened this issue Dec 5, 2024 · 1 comment
Closed

Indentation removed on Svelte <script> tag first line. #89

notramo opened this issue Dec 5, 2024 · 1 comment

Comments

@notramo
Copy link

notramo commented Dec 5, 2024

The indentation is removed from the first line of a Svelte <script> tag.

input:

<script>
  import a from './a';
  import b from './b';
</script>

<div></div>

output:

<script>
import a from './a';
  import b from './b';
</script>

<div></div>

It's worth noting that neither the official TS/JS plugin, nor Biome plugin is installed, so ideally the <script> part should be left untouched. It may have been unnoticed because most setups contain a TS/JS plugin which fixes the indentation problem.

@g-plane
Copy link
Owner

g-plane commented Dec 6, 2024

Personally I think it isn't worth handling this special case without any plugins that format JavaScript.

@g-plane g-plane closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2025
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

2 participants