How to configure ES6 code verification

I used PyCharm and I really liked it. I recently switched to ES6 for my javascript code. But PyCharm doesn't seem to like it. For things like => or let , a syntax error will be displayed. I tried many things, such as disabling validation, and all my efforts were in vain. I think I should be missing out on something stupid, because usually PyCharm is smart enough. What a trick?

PyCharm Version: 2016.1

END OF QUESTION

A bit of ranting at the end: I would really like it to work. As a Vim user for a long time, it's hard for me to configure Vim for a dynamic language such as Javascript, and continue to make stupid mistakes that take a lot of time. I tried VSCode and, like the default behavior, but Vim emulation is sh * t. JetBrain products have the best Vim emulation, and for me it's a big selling point.

+5
source share
1 answer

Just go to Preferences -> Languages & Frameworks -> Javascript and change the "JavaScript version" to ECMAScript 6

enter image description here

+10
source

All Articles