tslint-consistent-codestyle
Version:
Additional rules to enforce constistent code style with tslint
6 lines (3 loc) • 395 B
Markdown
## no-unnecessary-else
If an if block contains a return, throw, continue or break statement, the else block becomes unnecessary. Its contents can be placed outside of the block.
This is basically [no-else-after-return](./no-else-after-return.md) with additional checks including `throw`, `continue` and `break`. Replace `no-else-after-return` with `no-unnecessary-else` in your `tslint.json`.