We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When we have a nested conditional, we should probably break each one.
Currently it is like this.
return (h >= '0' && h <= '9') ? h - '0' : (h >= 'a' && h <= 'f') ? h - 'a' + 10 : (h >= 'A' && h <= 'F') ? h - 'A' + 10 : -1;
But I think it should look like this
return h >= "0" && h <= "9" ? h - "0" : h >= "a" && h <= "f" ? h - "a" + 10 : h >= "A" && h <= "F" ? h - "A" + 10 : -1;
Prettier does it like this, but I think the indentation makes it more readable
The text was updated successfully, but these errors were encountered:
I like your approach for this @belav. The prettier one is pretty(no pun intended :P) confusing.
I forgot to mention the one true correct way ™ to do it though. Just don't use ternary operators :)
one true correct way ™
Sorry, something went wrong.
Always break and indent nested conditionals
5e6d5cb
closes #434
@respel you should look at some of the crazy nested ternary operators https://github.com/belav/csharpier-repos/pull/10/files
d4698d8
Always break and indent nested conditionals (#460)
4393a02
closes #434 Co-authored-by: Lasath Fernando <devel@lasath.org>
fe42537
belav
Successfully merging a pull request may close this issue.
When we have a nested conditional, we should probably break each one.
Currently it is like this.
But I think it should look like this
Prettier does it like this, but I think the indentation makes it more readable
The text was updated successfully, but these errors were encountered: