🐊Putout plugin adds ability to find and remove duplicate case
npm install @putout/plugin-remove-duplicate-case[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-duplicate-case.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-duplicate-case "npm"
> The switch statement evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case, as well as statements in cases that follow the matching case.
>
> (c) MDN
🐊Putout plugin adds ability to find and remove duplecate case.
```
npm i @putout/plugin-remove-duplicate-case
`json`
{
"rules": {
"remove-duplicate-case": "on"
}
}
`js
switch(x) {
case 5:
console.log('hello');
break;
case 5:
console.log('zz');
break;
}
`
`js``
switch(x) {
case 5:
console.log('hello');
break;
}
MIT