FR: Do not allow EventEmitter in Service #828
rafaelss95
started this conversation in
New Rule Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description and reproduction of the issue
OP: mgechev/codelyzer#457
Although there's nothing explicit saying in
EventEmitter
docs that we shoun't use EventEmitter in a Service, this excellent answer on SO clarify things a bit more:Example:
So, to go a bit further... what about creating a generic rule that enforces certain types at certain contexts based on decorator, like we do for
contextual-decorator
andcontextual-lifecycle
? It means that we wouln't create a rule specific forEventEmitter
, but a generic instead.Beta Was this translation helpful? Give feedback.
All reactions