wesbos / eslint-config-wesbos

No-Sweat™ Eslint and Prettier Setup - with or without VS Code
2.73k stars 419 forks source link

Issue on using top level await in node files #91

Closed akshaymattoo closed 3 years ago

akshaymattoo commented 3 years ago

116:19 error Parsing error: Unexpected reserved word 'await'. const dbClient = await new DBConnect().connect()

Dujota commented 3 years ago

without seeing your code, its hard to help you, but usually its because you don't have async on the function that dbClient variable to scoped to.

this will helo you out https://stackoverflow.com/questions/42299594/await-is-a-reserved-word-error-inside-async-function