eslint Parsing error: Unexpected token function with async
I was getting this error also, I added the following to my eslintrc:
{
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 8
}
}
In my case it got fixed when I just changed from:
"parserOptions": { "ecmaVersion": 8 }
to
"parserOptions": { "ecmaVersion": 2018 }