3 ms·
Exactly: Linting rules requiring semicolons should be considered a best practice. But I think TypeScript should also be considered a best practice, and between
by SomeCallMeTim 10y ago
Exactly: Linting rules requiring semicolons should be considered a best practice.
But I think TypeScript should also be considered a best practice, and between the two that would solve pretty much all of his complaints.
Well, that and using "==" to compare to null, vs. "===" to compare to everything else. But the linters all can make that distinction as well.
But he explicitly hates on linters in the article as well. And dismisses TypeScript and Flow ... because his coworkers aren't being forced to use it? THAT is the real problem, I think...
- wmil 10y agoFor anyone else reading this in the future, I should mention that the ESLint 'no-unreachable' rule will catch this even if you don't require semicolons.
- SomeCallMeTim 10y agoGood point! Didn't say this explicitly, but TypeScript will, by default, prohibit unreachable code as well. [1] [1] "allowUnreachableCode" defaults to false: https://www.typescriptlang.org/docs/handbook/compiler-options.html https://www.typescriptlang.org/docs/handbook/compiler-option...