Ignore intentionally-stored promises in `require-await-function` rule?
bmish opened this issue · comments
Bryan Mishkin commented
Saw this in a test:
// simulate two clicks
const promise1 = click('[data-test-pricing-section-cta-primary="plus"]'); // eslint-disable-line square/require-await-function
const promise2 = click('[data-test-pricing-section-cta-primary="plus"]'); // eslint-disable-line square/require-await-function
await Promise.all([promise1, promise2]);
If we know we're trying to store and use the promises like this, we could potentially update the rule to ignore these lines.
Bryan Mishkin commented
I'm filing this for the record but closing it since it's a low-priority edge case.