lint fixes
Throw when queue#flush is called with no deferred events

Closes #38