Hacker News new | ask | show | jobs
by notyourday 1888 days ago
If you don't have a 'return' there's nothing to say that some time later some junior developer would not modify throw to be something else or forget that throw does not return.
2 comments

This will prevent the JR dev from making that mistake: https://eslint.org/docs/rules/no-fallthrough
That's what tests are for.