-
Notifications
You must be signed in to change notification settings - Fork 889
Add "no-null-undefined-union" rule. #4589
Add "no-null-undefined-union" rule. #4589
Conversation
Thanks for your interest in palantir/tslint, @nrathi! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost there
Co-Authored-By: nrathi <neharrathi@gmail.com>
Co-Authored-By: nrathi <neharrathi@gmail.com>
@nrathi as per this, should we stop using |
I was pretty surprised with the effect this has on consuming |
+1 to @rafeememon ’s point, it feels like the rule should be enforced on type definitions rather than on consumed types, so you wouldn’t be able to define types with the union, but could still consume types that have defined the union already. That way you can trend towards the right direction without encouraging the disabling of this rule due to external types |
PR checklist
CHANGELOG.md entry:
[new-rule]
no-null-undefined-union
This change is