1 # Rule to disallow a duplicate case label (no-duplicate-case)
3 If a `switch` statement has duplicate test expressions in `case` clauses, it is likely that a programmer copied a `case` clause but forgot to change the test expression.
7 This rule disallows duplicate test expressions in `case` clauses of `switch` statements.
9 Examples of **incorrect** code for this rule:
12 /*eslint no-duplicate-case: "error"*/
22 case 1: // duplicate test expression
33 case one: // duplicate test expression
44 case "1": // duplicate test expression
51 Examples of **correct** code for this rule:
54 /*eslint no-duplicate-case: "error"*/