-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
lang:vueIssues affecting VueIssues affecting Vuestatus:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug
Description
Unquoted numeric property names seem to be supported in Vue expressions.
But first, before fixing this, it'd be good to find some solid confirmation that it's 100% safe to do that.
Prettier 2.2.1
Playground link
--parser vueInput:
<template>
<div id="app">
<HelloWorld :msg="{ '0': 'Hello Vue!' }[0]"/>
</div>
</template>Output:
<template>
<div id="app">
<HelloWorld :msg="{ '0': 'Hello Vue!' }[0]" />
</div>
</template>
Expected (?):
<template>
<div id="app">
<HelloWorld :msg="{ 0: 'Hello Vue!' }[0]"/>
</div>
</template>brody4hire and AdrianoCahete
Metadata
Metadata
Assignees
Labels
lang:vueIssues affecting VueIssues affecting Vuestatus:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug