forked from prettier/prettier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format TypeScript expressions in Vue template attributes (prettier#14506
- Loading branch information
Showing
23 changed files
with
715 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#### Format TypeScript expression in attribute bindings (#14506 by @seiyab) | ||
|
||
<!-- prettier-ignore --> | ||
```vue | ||
<!-- Input --> | ||
<script lang="ts"></script> | ||
<template> | ||
<comp :foo=" (a:string)=>1"/> | ||
</template> | ||
<!-- Prettier stable --> | ||
<script lang="ts"></script> | ||
<template> | ||
<comp :foo=" (a:string)=>1" /> | ||
</template> | ||
<!-- Prettier main --> | ||
<script lang="ts"></script> | ||
<template> | ||
<comp :foo="(a: string) => 1" /> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script setup lang="ts"></script> | ||
|
||
<template> | ||
<div @click=" ( x : never) => null">arrow</div> | ||
<div @click=" function( a : unknown[]) { | ||
console.log( 'abcdefg'); | ||
return; | ||
}">anonymous function</div> | ||
</template> |
Oops, something went wrong.