You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within async functions, await () => {} is invalid syntax, at least according to Node.js v15.5.1:
asyncfunctiong(){f(await()=>{});}g();
hello.js:2
f(await () => {});
^^^^^^^
SyntaxError: Malformed arrow function parameter list
quick-lint-js reports no error for this code. Assuming that Node.js is standards-conforming, quick-lint-js should report an error for an attempted await for an arrow function.
The text was updated successfully, but these errors were encountered:
#278 is a related issue. #278 is about async()=>{} outside async functions. This task is about async()=>{} inside async functions. Perhaps the end result should be the same (i.e. same diagnostic and error recovery), but the parsing code seems to be different, so I thought they deserved separate tasks.
strager
changed the title
Error on await () => {}
8$: Error on await () => {}
May 10, 2021
strager
added
the
for hire
Get paid for working on this task: https://quick-lint-js.com/hiring.html
label
May 10, 2021
Within async functions,
await () => {}
is invalid syntax, at least according to Node.js v15.5.1:quick-lint-js reports no error for this code. Assuming that Node.js is standards-conforming, quick-lint-js should report an error for an attempted await for an arrow function.
The text was updated successfully, but these errors were encountered: