-
Notifications
You must be signed in to change notification settings - Fork 889
Add "check-type-operator" option for whitespace rule #3083
Conversation
Thanks for your interest in palantir/tslint, @santialbo! 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. |
This change looks very familiar to me. I think I've seen a similar PR before, but cannot find it right now. Btw. that's not a type operator (IIRC |
Got it: #2884 |
Yup, it does pretty much the same. Looking at the changes I noticed the other PR is not checking for the option to be true. |
You're right. Added a comment over there. Re type operator: unfortunately that could lead to confusion with the typescript spec where type operator refers to something completely different |
The spec currently refers to them as operators, so I think this naming is better than "type list". |
Rebased with latest master, I think the CI error is unrelated to this PR. |
@@ -9,7 +9,8 @@ | |||
"check-separator", | |||
"check-rest-spread", | |||
"check-type", | |||
"check-typecast" | |||
"check-typecast", | |||
"check-type-operator" |
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.
Do we also want to add this to tslint:latest
?
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.
yes please
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.
I'll do it in a separate PR
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.
your code looks good @santialbo, I'm fixing the master build here #3118
PR checklist
Overview of change:
This PR adds the "check-type-operator" option to the whitespace rule. The implementation is very similar to the binary operator one.
Is there anything you'd like reviewers to focus on?
CHANGELOG.md entry:
[new-rule-option]
check-type-operator
forwhitepace
rule