Including Async Function Within Firebase Cloud Functions (eslint "Parsing error: Unexpected token function")

Your eslint is not configured to understand ECMAScript 2017 syntax. The .eslint.json config file that's created by the Fireabse CLI by default includes this configuration:

"parserOptions": {
  // Required for certain syntax usages
  "ecmaVersion": 6
},

Change it like this to help it understand async/await:

  "ecmaVersion": 2017

I tried all solutions above which did not work for me. It was due to bad syntax in my package.json :

"scripts": {
    "lint": "eslint ."
  },

changed to :

"scripts": {
    "lint": "eslint"
  },

Like said Burak in the comments, this dot is put by default when we create firebase functions