Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upyoda expressions #175
Comments
This comment has been minimized.
This comment has been minimized.
|
Yoda expressions are less readable because they're backwards from how an english sentence works. You can read more at the eslint rule page. If you really want, you can fork {
"extends": ["standard", "standard-react"],
"rules": {
"yoda": 0
}
}But really, the point of |
feross
closed this
Jun 27, 2015
This comment has been minimized.
This comment has been minimized.
|
I see your point, thank you for the explanation! |
This comment has been minimized.
This comment has been minimized.
|
No problem! |
This comment has been minimized.
This comment has been minimized.
|
@nichdiekuh remembering, the primary principle behind using a yoda expression is to avoid the mistake of [accidentally] writing |
This comment has been minimized.
This comment has been minimized.
|
@dcousens Yep, you're correct. |
nichdiekuh commentedJun 27, 2015
Hi,
I was wanted to apply the standard rules on my codebase, but then I hit the yoda rule and felt strongly discouraged. Are there any strong arguments against using yoda expressions?
I can get the rid of semicolons and everything, but for some reason I'm struggeling to give up on yoda expressions.
Is it possible to add an exception for this case?