What side of the road do you drive on?
In England we say it's the right side which is of course left. This is enforced by the police, if I decided...
For further actions, you may consider blocking this person and/or reporting abuse
No.
How dare you π. I can't even remember writing this must have been a long time ago. Good that you know your mind
π― agree. When writing, we should always be optimizing for clear communication, not less words. Writing code is hard in large part because we're optimizing for clear communication to both humans and machines.
If you care about communicating in a particular way, then write in a language that embraces that style of communication. Using the handle of a screwdriver to bang in a nail when you've got a hammer within reach will work, but might make people go π€¨π€when they see what you're doing.
I think that, on the safe side, always add semicolon; but the only real time I need semicolon, is when the line starts with a bracket
.
In the end, it is more about being consistent, but it is easier to be consistent on the safe side.
I totally agree. Not deciding if I should put semicolons is one less problem in my life, if there is cases where I need them then I always need them.
OMG ; are optional in CSS ! must learn those rules ASAP (as an ex PHPer i hate ;)
Here is how that works
too late i LOVE it i will write some prettier rules straight away
Only after the last property and it is not a good idea to leave them out. Your colleagues are going to eat you alive.
I always pop my semi-colons in. I do run back and forth between PHP and JS it just makes sense. I let prettier handle the moments when I am dolt that forgets to put one in.
This is also largely why I struggle with languages like Ruby and Elixr, I love my braces and brackets to go along with semi-colons too. Makes me feel snug as a bug.
Understanding how a language parses code is difficult enough without ambiguity like ASI
I always use SemiStandard to lint my OSS projects
github.com/standard/semistandard