3 ms·
There's only one "extra" rule to remember when not using semicolons: the winky frown rule. If it starts with a frown (, [, ` then it must wink: ;(, ;[, ;` It's
by WorldMaker 3y ago
There's only one "extra" rule to remember when not using semicolons: the winky frown rule. If it starts with a frown (, [, ` then it must wink: ;(, ;[, ;`
It's a silly sounding rule, but that makes it easy to remember.
The rest of Automatic Semicolon Insertion footguns happen to everyone whether they use semicolons or not, such as: do not add a newline after return, that makes it a return undefined. Semicolons won't help. (Typescript return type annotations will help.)
Related to the topic at hand, prettier configured with `{ "semi": false }` (which I prefer to standard these days because I think prettier autoformatting is, uh, prettier) in my experience catches most winky frown violations for you and auto-fixes them.