Earlier quoted context omitted.
Same reason people don't use semi-colons in Python, I imagine. Besides, I'm not willing to acknowledge any reasons for using semi-colons as significant. And without any significant reasons for it, I may as well not use them. Besides, it makes the code prettier :).
I always think of using semicolons like using parentheses when doing math in code. It makes the order of operations explicit rather than implied. For example, 1 + 2 * 3 Solves to 7, obviously. But I'll write it in code like this: 1 + (2 * 3) Just to make it clear that I know what I mean, and I mean do the operations in _this_ order. Similarly, using semicolons to end lines means I am saying loud and clear... this lin…
var value = x + fn
(y).burp()
Is it obvious that there is a missing semi-colon at the end of line 1? The code is technically correct without it (not that I approve of it). You can assume it's wrong, but it's just a guess.If your code is in no-semi-colon style, there is no ambiguity, you can be 100% sure that this is a mistake: there always should be a semi-colon guarding that parenthesis, regardless of intent:
var value = x + fn
;(y).burp()
It's about removing ambiguity and visual clutter with a simple set of rules.How many JS programmers know the difference between a function expression or declaration, and the semi-colon that should follow or not? You're dependent on a linter. Following the no-semi-colon rules makes your intentions clear in every case, without machine validation.