g-plane / markup_fmt

Configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks and Vento formatter with dprint integration.
https://dprint.dev/plugins/markup_fmt/
MIT License
100 stars 9 forks source link

format quote in typescript as single quote in attrs #18

Closed clouds56 closed 6 months ago

clouds56 commented 6 months ago
<template>
  <div v-if="label = 'a'"></div>
</template>

is now formatted to

<template>
  <div v-if='label = "a"'></div>
</template>

Is it anyway to keep it as is? I don't want to change my typescript config "quoteStyle": "preferDouble".

g-plane commented 6 months ago

No. markup_fmt can't do anything with the code in attribute value, and markup_fmt just sends this code to "dprint-plugin-typescript" and let it format.

It may be possible. Needs investigation.