You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
Is your rule for a general problem or is it specific to your development style?
General problem
What does your suggested rule do?
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.
List several examples where your rule could be used
Spinning off of #2040: moving some rules of tslint-consistent-codestyle to tslint core.
Note that as ajafff mentioned, copied code without substantial changes needs to retain the original license.
The text was updated successfully, but these errors were encountered:
Rule Suggestion
Is your rule for a general problem or is it specific to your development style?
General problem
What does your suggested rule do?
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.
List several examples where your rule could be used
Instead of:
Prefer:
See https://github.com/ajafff/tslint-consistent-codestyle/blob/master/docs/no-unnecessary-else.md
Additional context
Spinning off of #2040: moving some rules of tslint-consistent-codestyle to tslint core.
Note that as ajafff mentioned, copied code without substantial changes needs to retain the original license.
The text was updated successfully, but these errors were encountered: