<template lang="pug">
template(v-for="el, i in foo" :key="i")
div {{ el }}
</template>
<script setup>
import { ref } from 'vue';
const foo = ref(['foo']);
</script>
Output or Error
Replace `el,·i·in·foo` with `(el,·i·in·foo)`
Output file:
<template lang="pug">
template(v-for="(el, i in foo)" :key="i")
div {{ el }}
</template>
<script setup>
import { ref } from 'vue';
const foo = ref(['foo']);
</script>
Expected Output
<template lang="pug">
template(v-for="(el, i) in foo" :key="i")
div {{ el }}
</template>
<script setup>
import { ref } from 'vue';
const foo = ref(['foo']);
</script>
Additional Context
The parenthesis ends up wrapping the whole v-for statement instead of just the two loop variables.
Info
Prettier config
Input
Output or Error
Output file:
Expected Output
Additional Context
The parenthesis ends up wrapping the whole
v-for
statement instead of just the two loop variables.