When are semicolons to be avoided in JS? I assume daft styleguides pushed by people desperate to show how smart they are don't count.
I agree with your broader point, of course; certainly making them optional hasn't helped matters.
I agree with your broader point, of course; certainly making them optional hasn't helped matters.
;(function() {
// .. snip
})()
And even that isn't required, it's just a function of another guideline: "Never start a line with (, [, or `." But still, that is only relevant to Standard, not to Javascript in general. It's completely self-enforced by deciding to use Standard if you want. I can't remember ever needing to put one of those characters at the start of a line outside that particular instance, anyway.Daft is correct, but some of them are being pushed by large companies and (frustratingly) seem to be somewhat adopted.