$ npm install @putout/plugin-remove-useless-arguments
🐊Putout plugin adds ability to find and remove useless arguments
.
npm i @putout/plugin-remove-useless-arguments
{
"rules": {
"remove-useless-arguments/arguments": "on",
"remove-useless-arguments/destructuring": "on",
"remove-useless-arguments/method": "on"
}
}
const sum = (a, b) => {}; // destructuring
sum(a, b, c);
const sum = (a, b) => {};
sum(a, b, c);
onIfStatement({
push,
generate,
abc,
helloworld,
});
function onIfStatement({push}) {}
onIfStatement({
push,
});
function onIfStatement({push}) {}
Check it out in 🐊Putout Editor.
class Parser {
parseStatement(context, topLevel, exports) {
this.parseGuard(a, b);
}
parseGuard() {}
}
class Parser {
parseStatement(context, topLevel, exports) {
this.parseGuard();
}
parseGuard() {}
}
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE