Jshint and async

I have jshint warnings here :

async function playerStart() {
    const firstMove = await movePlayer(100, 'Left')
    await movePlayer(400, 'Left')

“Expected an assignment or function call* and instead saw an expression”

But the code is valid.

jshint is now at 2.10, but in my “jshint.js” file I see 2.9.5. Is it because of that ?

Is there a plan to fix this issue ?

You can install the latest JShint using NPM then set a custom linter in your prefs: Edit menu > Preferences > Syntax & Spell Checking

Doing that removed the error. I’ve filed an enhancement to update JShint in the next release. If it’s not knocked out by higher priority items that can’t be fixed with npm install then it’ll be fixed in the next release.

  • Carey

Instructions to install the latest JShint:

I’d use the -g, aka. global option to install.