-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add case when identity function is explicit _.identity
- Loading branch information
Showing
2 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5cb384c
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 thought about this case a bit, but was thinking it might want to be a separate rule, or perhaps an option. Do
prop-shorthand
andmatches-shorthand
have the same behavior?For example, is this an error with
matches-shorthand
?5cb384c
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.
They don't have the same behaviour right now, but maybe they should. I actually had to fix a couple of these kinds of
_.identity
violations once I turned this on for one of our projects.shouldn't be to hard to implement.
5cb384c
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 you think there is ever a time where someone might want to allow/disallow one and not the other? I can't think of one. Assuming you are going this direction, I'll keep parity on my fork. Thanks for talking this through with me!