@putout/plugin-remove-duplicate-case
🐊Putout plugin adds ability to find and remove duplicate case
Last updated 10 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-remove-duplicate-case 
SYNC missed versions from official npm registry.

@putout/plugin-remove-duplicate-case NPM version

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.

Install

npm i @putout/plugin-remove-duplicate-case

Rule

{
    "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

Current Tags

  • 5.0.0                                ...           latest (7 months ago)

5 Versions

  • 5.0.0                                ...           7 months ago
  • 4.0.0                                ...           10 months ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 10
Today 0
This Week 1
This Month 7
Last Day 0
Last Week 0
Last Month 3
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE