3 ms·
For 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.
by wmil 10y ago
For 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...