2 title: no-duplicate-case
8 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.
12 This rule disallows duplicate test expressions in `case` clauses of `switch` statements.
14 Examples of **incorrect** code for this rule:
19 /*eslint no-duplicate-case: "error"*/
29 case 1: // duplicate test expression
40 case one: // duplicate test expression
51 case "1": // duplicate test expression
60 Examples of **correct** code for this rule:
65 /*eslint no-duplicate-case: "error"*/
106 ## When Not To Use It
108 In rare cases where identical test expressions in `case` clauses produce different values, which necessarily means that the expressions are causing and relying on side effects, you will have to disable this rule.
115 case i++: // eslint-disable-line no-duplicate-case