Rule: switch-final-break
Checks whether the final clause of a switch statement ends in break;
.
Notes:
Has Fixer
Config
If no options are passed, a final ‘break;’ is forbidden. If the “always” option is passed this will require a ‘break;’ to always be present unless control flow is escaped in some other way.
Config examples
"switch-final-break": true
"switch-final-break": [true, "always"]
Schema
{ "type": "string", "enum": [ "always" ] }