-
Notifications
You must be signed in to change notification settings - Fork 657
add unsafeNegation to lint for in and instanceof #87
Conversation
Hi @macovedj! Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
716a977
to
9c52c8c
Compare
9c52c8c
to
842f51c
Compare
Sorry, one last thing. Could you add a small test here. Just another snapshot test that tests something basic. We can work on more test cases later. Thank you! |
Just took a look and my understanding is that the example string can get formatted if we want. Looks like eslint takes the stance that it's rare that anybody would want to negate the left operand, so if we decided to adopt the same philosophy, then this seems like an opportune time to implement it in generateJS in the lint api. They allow for ignoring though, and it seems like we'd only want to to that if rome allows ignoring, and I haven't come across that yet. Thoughts? Maybe I'm overcomplicating things and I could just push up something simple for now like you said. |
@sebmck You can probably disregard my earlier comment about tests. Just pushed a simple snapshot test. |
4e75be1
to
d628575
Compare
Looks good, thank you! |
I implemented the rule as eslint does without options. Happy to add other binary expressions if desired. Not sure if you want a PR per rule or not.