You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
div.px-6.mb-2(v-for="transferService, index in allTransferServices":key="`${transferService.protocol}-${transferService.id}`")
Output or Error
.px-6.mb-2(
v-for="(transferService, index in allTransferServices)"
:key="`${transferService.protocol}-${transferService.id}`"
)
Expected Output
.px-6.mb-2(v-for="(transferService, index) in allTransferServices":key="`${transferService.protocol}-${transferService.id}`")
Additional Context
While we should technically have the parentheses in the markup, I've found a few places where they were missed as in the example above. Vue does do the right thing with that v-for and knows the first value is the value and the second is the index even without the proper parentheses. The "fix" for this appears to put the ending parentheses in the wrong place. Example diff after running yarn prettier --write src/**/*.vue:
Identical results on version 1.15.3 and 1.16.0-0.
The text was updated successfully, but these errors were encountered:
I was looking at this a bit this evening, and it may be an issue that plugin-pug can't do anything about. In formatDelegatePrettier(...) just before prettier format() is called the value for val is transferService, index in allTransferServices. The returned value of format(val, { parser, ...this.codeInterpolationOptions }); is (transferService, index in allTransferServices), so it looks to me like it might not be something to fix here.
Plugin Version
v1.15.3 & 1.16.0-0
Prettier Version
v2.3.1
Which frameworks are affected?
Node Version
v12.19.1
Which operating systems have you used?
Prettier config
Input
Output or Error
Expected Output
Additional Context
While we should technically have the parentheses in the markup, I've found a few places where they were missed as in the example above. Vue does do the right thing with that
v-for
and knows the first value is the value and the second is the index even without the proper parentheses. The "fix" for this appears to put the ending parentheses in the wrong place. Example diff after runningyarn prettier --write src/**/*.vue
:Identical results on version 1.15.3 and 1.16.0-0.
The text was updated successfully, but these errors were encountered: