Skip to content

[Bug] Typescript code in Vue template is not formatted #14432

@wenfangdu

Description

@wenfangdu

Prettier 2.8.4
Playground link

--parser vue

Input:

<script lang="ts"></script>

<template>
  <comp :foo="(a:string)=>1"/>
</template>

Output:

<script lang="ts"></script>

<template>
  <comp :foo="(a:string)=>1" />
</template>

Expected behavior:

<script lang="ts"></script>

<template>
  <comp :foo="(a: string) => 1" />
</template>

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:vueIssues affecting Vuelocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions