3.0.0 β’ Published 2 years ago
@putout/plugin-remove-duplicate-case v3.0.0
@putout/plugin-remove-duplicate-case 
The
switchstatement evaluates an expression, matching the expression's value to acaseclause, and executes statements associated with thatcase, as well as statements incasesthat follow the matchingcase.(c) MDN
πPutout plugin adds ability to find and remove duplecate case.
Install
npm i @putout/plugin-remove-duplicate-caseRule
{
"rules": {
"remove-duplicate-case": "on"
}
}β Example of incorrect code
switch(x) {
case 5:
console.log('hello');
break;
case 5:
console.log('zz');
break;
}β Example of correct code
switch(x) {
case 5:
console.log('hello');
break;
}License
MIT