@putout/plugin-remove-duplicate-case
putout plugin adds ability to find and remove duplicate case
Last updated 5 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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

  • 4.0.0                                ...           latest (2 months ago)

4 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |