@putout/plugin-remove-duplicate-case
v3.0.0
Published
šPutout plugin adds ability to find and remove duplicate case
Readme
@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
