gtap-dev / javascript

JavaScript Style Guide
MIT License
0 stars 0 forks source link

allow/enforce condition shortcuts for strings and numbers as well #15

Closed mjomble closed 2 days ago

mjomble commented 3 years ago

Fixes #11

Not sure about enforcing shortcuts for number comparisons. It makes sense to omit > 0 in length checks, but more clarity might be good in more math-heavy code. I added an exception for possibly negative numbers, but perhaps we should just allow deciding this case by case.