awaited chain expression is seen as invalid
VinceMalone opened this issue · comments
Vince Malone commented
Describe the bug
with the await-interaction
rule enabled, if a play function is being composed from another story, but the expression has an optional chain, it's seen as invalid; even if it's correctly awaited. because the expression will be seen as false and the auto-fix doesn't fix it; instead many redundant awaits are added.
To Reproduce
-
lint the following code with the
await-interaction
enabledexport const SecondStory = { play: async (context) => { await FirstStory.play?.(context) } }
-
run auto-fix
Expected behavior
it should be seen as valid and the auto-fix shouldn't alter the code
Screenshots
Yann Braga commented
This was released in v0.5.9! Thanks once again for your contribution @VinceMalone !