Skip to content

Parser issue #217

Description

@innocenzi

The following file cannot be formatted. The issue is with :for="for". I'm assuming there's some kind of edge case, maybe due to v-for.

Using the shorthand :for works, so I'm using that for now.

<script setup lang="ts">
defineProps<{
	title: string
	description?: string
	for?: string
}>()
</script>

<template>
	<div class="flex gap-x-2 setting-division">
		<label class="flex flex-col text-sm grow" :for="for">
			<span class="font-medium text-highlighted" v-text="title" />
			<span class="text-muted text-sm">
				<slot name="description">{{ description }}</slot>
			</span>
		</label>
		<div class="flex justify-end items-center sm:min-w-1/4">
			<slot />
		</div>
	</div>
</template>
$ dprint fmt
Error formatting file.vue. Message: failed to format code with external formatter:
Expected '(', got '<eof>' at file:///file.vue#.ts:1:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions