deno icon indicating copy to clipboard operation
deno copied to clipboard

deno fmt: Indentation of script tag in component files (svelte/vue)

Open nounder opened this issue 1 year ago • 1 comments

As of Deno deno 2.0.0-rc.6, deno fmt --unstable-component indents

 <script lang="ts">
-import { Button } from "$lib/components/ui/button"
+	import { Button } from "$lib/components/ui/button"

It is quite common in Vue and Svelte ecosystem not to indent

I'd like to propose to follow dprint defaults and, if it zen of Deno allows, expose option to configure it.

nounder avatar Sep 29 '24 12:09 nounder

Formatters like prettier with prettier-plugin-svelte generally use indentation in the script tag. Definitely would be better to make it configurable.

ieedan avatar Oct 15 '24 11:10 ieedan