arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6')

后端 未结 5 869
暗喜
暗喜 2021-02-05 04:27

Currently I\'m running my tests with protractor/grunt but I\'m getting the follow error message:

\'arrow function syntax (=>)\' is only available in ES6 (use          


        
5条回答
  •  你的背包
    2021-02-05 05:04

    It is not possible to add /*jshint esversion: 6 */ in each file.js file.

    Instead of above, please do below changes if you are using Visual Studio Code: -

    1. Open Visual Studio Code
    2. File -> Preferences -> Settings
    3. Default User Settings -> JSHint configuration
    4. look for "jshint.options": {},
    5. change it to "jshint.options": {"esversion": 6}, by clicking on Edit on the left

提交回复
热议问题