Closed
Description
What code were you trying to parse?
function foo() {
const bar = await baz();
}
What did you expect to happen?
Both espree
and babel-eslint
throw a parsing error when using await
inside a non-async
function. Should typescript-estree
also throw an error here? It looks like an error is highlighted in the TypeScript Playground.
What actually happened?
Parses without error.
Versions
"@typescript-eslint/eslint-plugin": "^2.3.0",
"@typescript-eslint/parser": "^2.3.0",
"eslint": "^6.4.0",
"typescript": "^3.6.3"
package | version |
---|---|
@typescript-eslint/typescript-estree |
2.3.0 |
TypeScript |
3.6.3 |
node |
10.16.3 |
npm |
6.11.3 |