Closed klemenoslaj closed 4 years ago
My understanding was that @Output
properties have the EventEmitter
type, so the type-based whitelist should suffice. Is that not the case?
My understanding was that
@Output
properties have theEventEmitter
type, so the type-based whitelist should suffice. Is that not the case?
That is true and while not considered best practice I saw often people use Subject
or a piped Observable
as an output. In this case we cannot limit to the type.
I actually use it sometimes, because it makes my code a bit cleaner.
I'm not keen on encouraging or supporting something that's not best practice, so no, I'm not inclined to extend the rule's options in this way.
Anyone who has a problem with this can use a TSLint comment to ignore that line, etc.
Currently we have a whitelist of
rxjs-finnish
rule based onnames
andtypes
. I wonder if it would be possible to whitelist a class property based on the presence of a decorator?Use case: In Angular some fields are decorated with
@Output
and it would be super strange for these fields to have$
suffix.