Skip to content

eslint complains about 'await' outside an async function, but the code works #12025

Closed Answered by eltigerchino
danielniccoli asked this question in Q&A
Discussion options

You must be logged in to vote

I’m assuming the default eslint config is set to maintain comptibility with older browsers / client devices. If you intend to use more modern javascript features or only on the server, you can simply change the config to allow it or apply an override to files that are suffixed with .server.js, etc. https://eslint.org/docs/latest/use/configure/configuration-files#how-do-overrides-work

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@danielniccoli
Comment options

@danielniccoli
Comment options

@eltigerchino
Comment options

Answer selected by danielniccoli
@danielniccoli
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants