TIL about the greek question mark
Tell me, can you tell the difference between these two characters?
;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž
TIL about the greek question mark
Tell me, can you tell the difference between these two characters?
;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž;Íž
It is recommended. But in TS it is not necessary with rare exceptions.
thanks to eslint enforcing it in the default rules itâs necessary for most typescript projects
Except that you should use Prettier for formatting instead of ESLint. That said, semicolons are useless noise
Why should you use that?
It adds even more auto formatting rules so you can basically stop thinking about formatting entirely. I used to be opinionated about formatting but now I just go with whatever prettier does. Itâs not always the best but itâs consistent and itâs a big chunk of my brain I can free up for things that matter. It also formats things safely so you donât run into those weird edge cases where semicolons matter if you choose to turn them off.
Arenât some of the scenarios for needing a semicolon logical-domain problems and not syntax issues? I wouldnât trust autoformatting to spot a logical problem, though I also hope no one is writing code that flippantly. (as if honest mistakes arenât common enough!)
Maybe thereâs some edge case but in my years of using prettier I havenât encountered one once.
Never used eslint. prettier is a must. semicolons are only needed to split some rare TS syntax lines.
I wouldnât do it without an auto formatter. With prettier it will catch potential no semi colon issues.
You absolutely have to use prettier with JS. I donât think there is auto adding missing semicolons in C/C++ though, it would be very useful.
I tried prettier and I thought it was literally making my code uglier. Itâs eslint --fix for me.
Yes, true. I also did setup so that any missing semicolon will be added, because I got sick of not inserting them sometimes and then some code was without them and some was. (Before I tested just leaving them all out, out of fun, so I got into the habit of just leaving them out regularly)