Rule: no-switch-case-fall-through

Disallows falling through case statements.

For example, the following is not allowed:

switch(foo) {
    case 1:
        someFunc(foo);
    case 2:
        someOtherFunc(foo);
}

However, fall through is allowed when case statements are consecutive or a magic /* falls through */ comment is present. The following is valid:

switch(foo) {
    case 1:
        someFunc(foo);
        /* falls through */
    case 2:
    case 3:
        someOtherFunc(foo);
}
Rationale

Fall though in switch statements is often unintentional and a bug.

Config

Not configurable.

Config examples
"no-switch-case-fall-through": true
Schema
null