I've been using the no-floating-promises TypeScript ESLint rule to catch situations where I've missed an await (very common issue when using Playwright).
That helps identify situations like this very nicely:
myAsyncFunction(); // Missing await is identified
However, it does not identify situations like the following:
const foo = new RegExp(
[
"foo",
this.myAsyncFunction(), // Missing await is **not** identified
].join(".*"),
"s",
)
I tried also using no-misused-promises, but that didn't appear to help in this context either.
Is there some other rule I can use to identify such problems?