mysticatea / eslint4b

ESLint which works in browsers.
MIT License
37 stars 19 forks source link

How can i use with code contains async function #7

Closed Suniron closed 4 years ago

Suniron commented 4 years ago

How to configure this module so that it does not detect an error in the following code: async function* main() {/* do something with await*/}

I got this error message (with linter.verify()):

{
  ruleId: null, 
  fatal: true, 
  severity: 2, 
  message: 
  "Parsing error: Unexpected token function"
line: 1, column: 7
}

I think that i need to set ESLint parserOptions on another ECMAversion but I don't know about that.

Thanks

mysticatea commented 4 years ago

I think that i need to set ESLint parserOptions

Exactly. You can see the official documentation on https://eslint.org/docs/developer-guide/nodejs-api#linter