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

后端 未结 5 849
暗喜
暗喜 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条回答
  •  梦毁少年i
    2021-02-05 05:08

    You can do more project-specific settings by following these steps.

    1. Create a folder with the name of .vscode at the root of your project directory
    2. Create a file with the name settings.json
    3. Add the following content into it.
    {
      "jshint.options": {
        "esversion": 6
      }
    }
    

    You can add some more settings to keep things consistents across your team.

    {
        "editor.tabSize": 2,
        "editor.formatOnSave": true,
        "editor.formatOnType": true, 
        "jshint.options": {
            "esversion": 6
        }
    }
    

提交回复
热议问题