Open sagalbot opened 8 years ago
<script type="text/babel"></script>
Fixes the issue, but it'd be great to have this built in.
Thanks @sagalbot. That helped.
+1. Would be great to have it fixed.
Well, inside .js files, the auto-format is almost broken with this plugin since it sometimes transforms =>
to = >
.
There is no way for those .js file to define type="text/babel"
.
I was confused , how can I fix this?
@Harbon In your script tag in the .vue file:
<template>
<!-- Your template -->
</template>
<script type="text/babel">
// Your vue stuff
</script>
The type
declaration in the script tag will update the indexer as to what to expect from the code bellow.
Well, I do not remember what I was talking about, since I do not encounter that bug anymore. I therefore consider this 'fixed' :)
It is not fixed! You get random formatting for ES6 syntaxes.
@hughsaffar, are you adding the type attribute <script type="text/babel">
?
Do you have ES6 set as the default language version as below?
I do have ES6 as the default language and it works ok in .js files. But the problem is that it used to work without Githubissues.
I'm having trouble getting phpStorm to recognize ES6 fat arrow functions in my
.vue
components.Before:
After Code Reformat:
I have the JavaScript language version set to ECMAScript 6, and it works great outside of
.vue
components. Any suggestions?