Problem:
When using Visual Studio Code to edit my Meteor project, I keep seeing the error:
'import' is only available in ES6 (use 'esversion: 6'). (W119) jshint(W119)
For example:
Workaround:
- To hide the jshint errors: in the main folder of your Meteor project, if the file named ".jshintrc" does not exist then add it
-
In this .jshintrc file, add the following text:
{ "esversion": 6 }
You may need to close and reopen the project in VSCode. If the workaround is successful, you should no longer see the esversion 6 error.
Notes:
This workaround was verified to help remove the jslint errors while using Visual Studio Code version 1.43.1 with Meteor 1.10.1. Your results may vary given different versions. Please also note that this workaround hides the jshint error from being highlighted, but it won't fix compilation errors if your Meteor project isn't properly setup to compile esversion 6.
No comments:
Post a Comment