Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
cb21910095yAbsolutely support this. Although I have already seen an "any" type at work. But what is a pre-commit hook? Some automation before the commit?
-
@EdoPhoenix Whichever. I had a weird thing years ago where V8 mistook the next line for a continuation so I also use obligatory semicolons but, much like the whitespaces, the only unacceptable way is mixing them.
-
theuser47815yI think type checking should also be on that list. Typescript obviously cannot do anything for you at runtime, so if someone sneakily makes some changes to an API, then your running frontend may go tits up either way.
These are the rules that apply to all of my JS projects:
- 100% typescript, “any” is not allowed
- strict prettier with pre-commit hook
- no semicolons
- no braces around single argument of an arrow function
- tabs
rant
they hate me for this