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

@putout/plugin-remove-useless-arguments NPM version

🐊Putout plugin adds ability to find and remove useless arguments.

Install

npm i @putout/plugin-remove-useless-arguments

Rule

{
    "rules": {
        "remove-useless-arguments/arguments": "on",
        "remove-useless-arguments/destructuring": "on",
        "remove-useless-arguments/method": "on"
    }
}

arguments

❌ Example of incorrect code

const sum = (a, b) => {}; // destructuring
sum(a, b, c);

βœ… Example of correct code

const sum = (a, b) => {};
sum(a, b, c);

destructuring

❌ Example of incorrect code

onIfStatement({
    push,
    generate,
    abc,
    helloworld,
});

function onIfStatement({push}) {}

βœ… Example of correct code

onIfStatement({
    push,
});

function onIfStatement({push}) {}

method

Check it out in 🐊Putout Editor.

❌ Example of incorrect code

class Parser {
    parseStatement(context, topLevel, exports) {
        this.parseGuard(a, b);
    }
    
    parseGuard() {}
}

βœ… Example of correct code

class Parser {
    parseStatement(context, topLevel, exports) {
        this.parseGuard();
    }
    
    parseGuard() {}
}

License

MIT

Current Tags

  • 8.0.0                                ...           latest (a year ago)

23 Versions

  • 8.0.0                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 6.3.0                                ...           2 years ago
  • 6.2.0                                ...           2 years ago
  • 6.1.0                                ...           2 years ago
  • 6.0.0                                ...           3 years ago
  • 5.2.0                                ...           4 years ago
  • 5.1.0                                ...           4 years ago
  • 5.0.1                                ...           4 years ago
  • 5.0.0                                ...           4 years ago
  • 4.2.1                                ...           4 years ago
  • 4.2.0                                ...           4 years ago
  • 4.1.0                                ...           4 years ago
  • 4.0.2                                ...           4 years ago
  • 4.0.1                                ...           4 years ago
  • 4.0.0                                ...           5 years ago
  • 3.0.1                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

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