Edit 3: Starting in version 0.4.0, ES6 syntax can be turned on by adding a jsconfig.json
file to the project folder with the following contents:
{ "compilerOptions": { "target": "ES6" } }
Edit 2: You can vote for this feature on user voice
Is there a way to "turn on" ES6/ES7 in Visual Studio Code?
Edit 1
Tried @sarvesh's suggestion- overrode javascript.validate.target
and restarted vscode. Didn't help.
You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript).
Step 1: From Settings – Type CodeLens and Enable the Editor: Code Lens and JavaScript > References Code Lens to check the references in JavaScript File.
Open the JavaScript file in VSCode, then use shortcut Ctrl + Alt + N , the code will run and the output will be shown in the Output Window.
It's quite easy, at the root of your project create a jsconfig.json file and write this object in it:
{ "compilerOptions": { "target": "ES6", "module": "commonjs" } }
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