Closed mhofman closed 1 year ago
I think it'd be sufficient to check for parent.operator === '='
in the current AssignementOperation
check:
https://github.com/endojs/Jessie/blob/fc7c40e3208f8ecfb54e295f664800fbb0bfda90/packages/eslint-plugin/lib/rules/no-nested-await.js#L59-L62
WDYT @michaelfig ?
A non plain assignment operation aka anything different than
lhs = expr
(e.g.lhs += expr
) evaluates thelhs
before evaluating theexpr
.These evaluation semantics may be surprising if the expr contains an
await
. Furthermore Jessie currently disallows the equivalent deconstructed behavior (lhs = lhs + await expr
).