DEV Community

Discussion on: To Semicolon, Or Not To Semicolon;

Collapse
intricatecloud profile image
Danny Perez

I enforce semicolons via eslint. If I don't, then I find myself writing some lines with and some lines without which has made it more distracting for coworkers (Are you using it or not?!)

I did not know about ASI so this was very helpful. On larger teams, the rule has been - doesn't matter as long as we're consistent.

Collapse
emnudge profile image
EmNudge Author

Consistency among any styling choice is always going to be the most important decision!
Styling choices are irrelevant unless they're consistent.

I find myself preferring automatic formatters like Prettier over linters to avoid all the headache. When using auto-formatters, one should always make sure everyone else is using the same thing or else git commit logs will be obscured by a ton of semicolon insertions and whitespace, making it hard to read exactly what changed.