Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
notyourday
· 5y ago · 0 comments
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.
Comments
[–]
dfee
5y ago
This will prevent the JR dev from making that mistake:
https://eslint.org/docs/rules/no-fallthrough
[–]
BiteCode_dev
5y ago
That's what tests are for.