need a correct eslintrc for async/await - using 7.6+ nodejs

后端 未结 1 1532
离开以前
离开以前 2020-12-18 20:04

With the latest version of nodejs 7.6+ I started using async/await.

I was using jshint but from what I read they currently do support this syntax and some suggested

1条回答
  •  一生所求
    2020-12-18 20:38

    Since async/await is an ES2017 feature, you need to add that to your .eslintrc.js:

    module.exports = {
        // ...
        "parserOptions": {
            "ecmaVersion": 2017
        },
        // ...
    }
    

    0 讨论(0)
提交回复
热议问题