Replies: 1 comment
|
Another idea: a broader |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Can I open a PR to add a
no-floating-errorrule? It would flag when a call expression returns a type containingError(or a subclass) and the result is discarded as an expression statement.This enforces the "errors as values" pattern from errore, where functions return
Error | Tunions instead of throwing. Callers must checkinstanceof Errorbefore proceeding, and discarding the result means the caller forgot to handle the error.I have a working implementation with tests already.
All reactions