And auto formatters will add them for you so you don't get semicolon bugs. Shit like that is the whole purpose of linters - preemptively avoid common patterns which cause bugs.
I believe an auto formatter shouldn't ever modify the code you tell it to format. Sure, add a close bracket for me when I make an open bracket, but if I tell my IDE to format a block of code it shouldn't change it.
Depends - we use Prettier, which will add our semicolons. Because it's not really the linter doing smart things, it's the formatter formatting your code in the way that the js runtime will be interpreting it.
Adding semicolons will never change behavior in JavaScript, it'll only make it more apparent that you messed it up. If you don't use them, JS will do automatic insertion anyways which can cause weird issues if you're not looking specifically for that. But if your formatter does it, you'll see the issue right away when you end up with:
32
u/Delioth Sep 23 '19
And auto formatters will add them for you so you don't get semicolon bugs. Shit like that is the whole purpose of linters - preemptively avoid common patterns which cause bugs.