docs(ComponentCode): update prettier options

This commit is contained in:
Benjamin Canac
2024-07-18 14:10:10 +02:00
parent 0c4b79f92e
commit ff678d6004

View File

@@ -129,7 +129,11 @@ const code = computed(() => {
const { data: ast } = await useAsyncData(`component-code-${name}-${JSON.stringify({ props: componentProps, slots: props.slots })}`, async () => {
let formatted = ''
try {
formatted = await $prettier.format(code.value, { trailingComma: 'none', vueIndentScriptAndStyle: true })
formatted = await $prettier.format(code.value, {
trailingComma: 'none',
semi: false,
singleQuote: true
})
} catch (e) {
formatted = code.value
}