When I try to define callback function using
() => { }
instead of
function () {}
I get this error from PhpStorm
How to fix this?
In the menu:
PhpStorm > Preferences > Languages & Frameworks > Javascript
You'll see a box that says: JavaScript Language Version.
You should be able to change the option to ECMAScript 6 and apply.
Also:
PhpStorm > Preferences > Editor > File Types Find ECMAScript 6 in the list and add *.vue to the registered patterns list. You could add it to the Javascript file type to for good measure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With