Search code examples
javascriptvisual-studio-codejshint

JSHint does not recognise Async/Await syntax in Visual Studio Code (VSCode)


I've been struggling with VSCode and JSHint to find out a way to get rid of this syntax highlighting. It seems like JSHint is not able to recognise Async/Await syntax.

Here you can find a screenshot of what I'm talking about.

enter image description here

My JSHint version: jshint-esnext v2.7.0-3


Solution

  • I had the same issue and this worked for me. Try using npm uninstall -g jshint to completely unistall jshint, then npm install -g jshint to re-install the latest version. Make sure your package.json has the following information in it:

    "jshintConfig": { "esversion": 8, "strict": "implied", "devel": true, "node": true, "globals": {} }