EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular

Rule for warning about using `throw` in `catch` functions

Open
#239 0 comments 0 reactions 0 assignees View on GitHub
Rule
Dominant language
JavaScript
Stars
620
Forks
127
PR merge metrics
No merged PRs in 30d

Description

I have a suggestion for a rule that would be very useful for me. I'd like to know if a contributor is using `throw` inside a $q `catch` implementation and suggest they use `return $q.reject` instead. The problem with throw with $q is that Angular's implementation always sends what's thrown to the $exceptionHandler even when it's caught later whereas `$q.reject` doesn't.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.